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
560
Checkbox in column header of a checkbox column
posted

My XamDatagrid has a number of checkbox (boolean) columns.  How can I have a checkbox in the header next to the header text that i can check/uncheck to correspondingly check/uncheck the checkboxes in the entire column?

Thanks,

Joe

  • 69686
    Suggested Answer
    posted

    Hello Joe,

    This is not a built-in functionality in the XamDataGrid. If you want to have Checked,Unchecked and Undeterminate states, you would have to handle the checked/unchecked events of the CheckBox in the header and set the values manually in the cells below it.

    Another way would be to create a one-way binding between the checkboxes in the cells and the one in the header. You would not be able to do that directly, so you could use an attached property or the Tag property.