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.
Thanks Steve, the zip file helps, I got it to work.
Is there an example already out there somewhere that shows how to do it with a ViewModel?
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