I'm trying to implement a kendo grid which allows users to select rows using checkbox. It will provide:
- Select all
- Unselect all
- select multiple rows
- unselect multiple rows
- Updates the users No of rows selected while doing all of the above actions.
UI: I've used headerTemplate
for creating select all checkbox
and template
for creating checkbox for each row.
Functionality:
Used change
event of kendoGrid
for updating the number of rows selected
and dataBound
event for attaching event handlers to checkbox
.
I've used grid.select()
for selecting a row but it is working only when we specify selectable
option while initializing grid
and grid.clearSelection()
for un selecting all rows.
See the demo Kendo Grid UI for better understanding
I found few resources suggesting to add a active class to selected row, however the change event is not firing. Grid selection using checkbox
Questions
Now the issue is, how can one implement multiple select which fires the change
event?
Is there any function available to unselect a row that is selected by grid.select()