Customize the header checkbox behavior in GridViewCheckBoxColumn
Environment
Product Version | Product | Author |
---|---|---|
2019.1.219 | RadGridView for WinForms | Dimitar Karamfilov |
Description
This article describes how you can change the behavior of the header checkbox in the GridViewCheckBoxColumn. This allows to specify which cell should be checked or perform a completely different action when the checkbox state is changed.
Solution
In this example I am using the value in another cell in order to determine which cells should be changed. I am using the ShouldCheckDataRows property to disable the default behavior. In the HeaderCellToggleStateChanged event handler I am changing the value of the cells that meet specific criteria.