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

Check all checkboxes, with a twist...

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 02 Feb 2017, 03:13 PM

I've seen several examples of implementing a CheckAll checkbox column header, but I've only seen it implemented in a grid that has a column bound to a boolean field/property. Unfortunately this doesn't really help me.  I have a grid bound to a list of data entities but in place of the row number (or ID field), I am displaying a checkbox.  I'd like to have a checkbox in the column header for that row that will check all the checkboxes in that column.  Every example I've seen modifies the datasource, or the underlying object... changing a boolean field from false to true to check it.  But since my checkboxes are not actually bound to a boolean field, how can I accomplish this same thing?

Not that it's pertinent, but I'm displaying a list of documents in this grid, allowing the user to select individual ones that will then send the row IDs to an MVC controller for zipping up the documents into a ZIP file for download.  So it's more of a selection type checkbox as opposed to denoting a boolean true or false.

I have the appropriate javascript function for getting the checked checkboxes, just need a way to check all for ease of use.

 

1 Answer, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 02 Feb 2017, 04:01 PM
This was already answered in another thread...  You can disregard this request.
Tags
Grid
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Share this question
or