How do I check the header checkbox when one or more rows have been checked?

I have a column of type GridCheckBoxColumn  in an SfDataGrid, bound with data from and Observable Collection. This is *not a tristate checkbox.
I would like to programmatically change the state of the header row's check box to "checked" when one or more of the data row's check boxes have been set to a state of "checked". How can this be done in C#?

Thanks.

2 Replies 1 reply marked as answer

ST Stoked replied to Brent Sodtke November 13, 2020 04:00 AM UTC

I have a column of type GridCheckBoxColumn  in an SfDataGrid, bound with data from and Observable Collection. This is *not a tristate checkbox.
I would like to programmatically change the state of the header row's check box to "checked" when one or more of the data row's check boxes have been set to a state of "checked". How can this be done in C#?

Thanks.

I was able to figure this out for my situation, referencing this forum post: https://www.syncfusion.com/forums/143800/how-to-uncheck-slected-checkbox-in-sfdatagrid

Marked as answer

SS Sampathnarayanan Sankaralingam Syncfusion Team November 13, 2020 09:08 AM UTC

Hi Brent, 
Thanks for contacting Syncfusion support. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Sampath Narayanan. S 


Loader.
Up arrow icon