Check all checkboxes, with a twist...

2 posts, 0 answers
  1. Joe
    Joe avatar
    150 posts
    Member since:
    May 2012

    Posted 02 Feb Link to this post

    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.

     

  2. Joe
    Joe avatar
    150 posts
    Member since:
    May 2012

    Posted 02 Feb Link to this post

    This was already answered in another thread...  You can disregard this request.
Back to Top