Frequently Asked Questions
FAQ about the Kendo UI Data Grid for jQuery
This article provides a collection of the most frequently asked questions (FAQ) on checkbox and answers related to the Kendo UI Grid.
- The latest tested version is 2017.2 621.
- The checkbox selectable column is available as of the Kendo UI R2 2017 SP1 release.
- The suggested approaches are tested up to Kendo UI version 2017.2 621.
How can I check checkboxes and select rows programmatically?
- In the
dataBound
event handler, get all the rows of the Grid. - Loop through the rows and based on the
dataItem
select the desired rows.
For more information, refer to the article on selecting rows programmatically on load.
How can I limit the selection to a single row and remove the master checkbox?
- Remove the master checkbox by adding an empty header template.
- In the
click
event handler of the checkboxes, use theclearSelection
method to remove the selection from the other rows.
For more information, refer to the article on limiting the selection to a single row.
How can I get the data item of the last selected row?
- In the
click
event handler of the checkboxes, get the row by using theclosest
jQuery method. - Get the row data by passing it as a parameter to the
dataItem
method.
For more information, refer to the article on getting the dataItem
for the last selected row.
How can I get all the selected rows dataItems?
- In the
change
event handler, get all the selected rows. - Loop through the rows and use the
dataItem
method for each row.
For more information, refer to the article on getting the dataItem
for each selected row.
How can I select all the rows on all the pages?
The implementation of this functionality might lead to slow Grid performance.
- Set the
persistSelection
configuration of the Grid totrue
. - In the
click
event handler of the master checkbox, show all rows on a single page. - Select the rows.
- Bring back the old page size.
For more information, refer to the article on selecting all the rows on all the pages.
How can I implement my own checkbox selectable column?
Use the configurations, methods, and events of the Grid and jQuery. For more information, refer to the article on selecting multiple rows by using checkboxes.