Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
610
Unbound Checkbox Selector Column
posted

Hello,

  I need to create a column in the grid that is used as a row selector that is a column of checkboxes, however, the column isn't bound to any item in the data.  We'd also like for a checkbox to be in the header that would check all items or uncheck all items in the column.

  Is this something that can be done, if so, does anyone have any suggestions how to?

Thanks.

 

 

Parents
  • 40030
    Offline posted

    Hi, 

    Generally, i'd recommend using a ViewModel for managing this. 

    However, if you're locked into the data, you can create a custom column, and store the isChecked state on the cell, i already happen to have a sample that shows this, here:

    To check/uncheck all the rows, when the checkbox in the header is clicked, you would hook up an event, to the checkbox, and walk through all of your rows, and update the Ischecked property on each cell.

    Hope this helps, 

    -SteveZ

Reply Children
No Data