New to Kendo UI for jQueryStart a free 30-day trial

Checkbox Selection Is Not Working for Custom Grids

Environment

ProductProgress® Kendo UI® Grid for jQuery
Operating SystemWindows 10 64bit
BrowserGoogle Chrome
Browser Version60.0.3112.113

Description

I want to use the new checkbox-selection feature of the Grid. However, when I click on the checkbox in the header, the checkboxes of the Grid rows are not selected and when I do the paging, the Grid doesn't persist the checkboxes that were selected from other pages.

How can I extend the kendo.ui.Grid class and implement the checkbox selection in the Grid?

Cause

Two of the private methods internally reference the Grid. As the widget is now called kendoMyGrid, the result is undefined and the additional logic is not executed.

js
checkBox.closest(".k-grid.k-widget").data("kendoGrid")

// now it should be

checkBox.closest(".k-grid.k-widget").data("kendoMyGrid")

Solution

Overwrite the two methods. Note that because the methods are private, their modification might cause unexpected behavior.

For the complete implementation of the approach, refer to this runnable example.