To do that you can follow these steps:
- Add
k-on-change="handleChange(kendoEvent)"
to trigger the function when we select any row,
- dont forget to add
k-rebind="gridOptions.selectable"
,
- and i also prefer
<div kendo-grid="grid"></div>
so later on we can
select the grid instance
- create
$scope.handleChange = function(kendoEvent){....}
to handle the event
- and finally here is a kendo dojo example from yours that i've modified
EDIT:
- As per your comment, you simply close all expanded row first then you can open the one which is selected. Add this
$scope.grid.collapseRow($scope.grid.tbody.find("tr.k-master-row"));
before $scope.grid.expandRow($scope.grid.tbody.find("tr.k-master-row.k-state-selected"));
. Updated dojo