Edit this page

Frequently Asked Questions

This article provides a collection of the most frequently asked questions (FAQ) and answers related to the Kendo UI Grid.

Tested up to version 2017.2 621

Checkbox Selection

Important

  • 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?

  1. In the dataBound event handler, get all the rows of the Grid.
  2. 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?

  1. Remove the master checkbox by adding an empty header template.
  2. In the click event handler of the checkboxes, use the clearSelection 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?

  1. In the click event handler of the checkboxes, get the row by using the closest jQuery method.
  2. 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?

  1. In the change event handler, get all the selected rows.
  2. 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?

Important

The implementation of this functionality might lead to slow Grid performance.

  1. Set the persistSelection configuration of the Grid to true.
  2. In the click event handler of the master checkbox, show all rows on a single page.
  3. Select the rows.
  4. 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?

You can achieve this by using the configurations, methods, and events of the Grid and jQuery.

For more information, refer to the article on selecting multiple rows by using checkboxes.

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy