This is a migrated thread and some comments may be shown as answers.

How to have more than one checkbox column?

1 Answer 549 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 08 May 2019, 04:52 PM

Scenario... My grid has a list of sales people (names, email addresses, etc).  I want to assign them to the US, Canada, or both.  I envision 2 checkbox columns.  At present, I can only use the column.Select() to have Kendo create the checkbox column (along with a "select all" in the header).  I'd like to have similar functionality except they can "select all" US, "select all" Cananda, or click both to select all for both countries.  The reason for the "select all" is because the person working in the UI may need to assign 1,000 people to one or both countries and I don't want them to have to click that many times.

Are there any other mechanisms to generate multiple checkboxes (plus a "check all" in the header) beyond the column.Select() method?

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Dikov
Telerik team
answered on 10 May 2019, 12:51 PM
Hello Jon,

The "select" column is used for the built-in selection functionality of the Grid and I have to say that it is not possible to use multiple select columns and add custom logic for them. Nevertheless, you could use template columns and render checkboxes in the column template and the header template for your custom selection. Within the DataBound event, you could get reference to the checkboxes in the header and attach handler for the click event, where you could select the desired rows. An example for the Kendo UI Grid is available in the following HowTo, but the same templates could be used with the MVC helper:

Best Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Jon
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or