Reputation: 541
Is it possible to add the k-on-change event to a Kendo Grid using the GridOptions. I want to call a function when a row in the grid is selected. I see where I can add it to the html but can not find documentation about adding it to the GridOptions.
Upvotes: 0
Views: 1299
Reputation: 2583
Its as easy as defining a change handler on the controller scope...
$scope.changeHandler = function(){
...
}
..and then referencing it on the directive tag.
<kendo-grid k-on-change="changeHandler"></kendo-grid>
Or did you specifically want to set it on the options object?
Then you can just do it as you would in standard kendo by defining the options object on the controller scope...
$scope.gridOptions = {
...
change: changeHandler,
...
}
... and then referencing it on the directive tag.
<kendo-grid k-options="gridOptions"></kendo-grid>
Upvotes: 1