We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How can I uncheck the check box column (Column Header) programatically.

Hi,

I have a DataBoundGrid which contains checkbox as one of the Header column. when i check that check box then all the check boxes in that column will be checked. similarly when i uncheck that, all the check boxes in that column will be unchecked.
The problem i got is when i check the check box in the header then all the check boxes will be checked it is o.k, but when the datasource of that grid is made null, all the data will be cleared, then also the check box in the column header is checked. How can i uncheck the checkbox through programatically.


-Thanks
Deepak

4 Replies

RA Raul April 20, 2007 03:05 PM UTC



>Hi,

I have a DataBoundGrid which contains checkbox as one of the Header column. when i check that check box then all the check boxes in that column will be checked. similarly when i uncheck that, all the check boxes in that column will be unchecked.
The problem i got is when i check the check box in the header then all the check boxes will be checked it is o.k, but when the datasource of that grid is made null, all the data will be cleared, then also the check box in the column header is checked. How can i uncheck the checkbox through programatically.


-Thanks
Deepak


Hey Deeepak,
I may have not have a solution to yr Question, however you have a soloution to my question..so kindly help..here it goes..
Could you help me out as to how to a add checkbox column along with a checkbox at the header...I bind my gridBoundDataGrid using a dataset at runtime..


HA haneefm Syncfusion Team April 20, 2007 06:17 PM UTC

Hi,

Please refer to the following KB article which explains how to have checkbox in the header cell of GridControl and GridDataBoundGrid
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=232

Here is a minimal sample that shows you "How can i uncheck the checkbox through programatically?"
CB_in_Header_CS.zip

Best regards,
Haneef


PK Pradeep Kumar April 21, 2007 05:41 AM UTC

Hi,
Thanks for your samples. The sample works fine to check or uncheck the checkboxes dynamically which are in the grid. Here my requirement is how can i uncheck the check box which is defined as a column header dynamicaly. which means i want to change the column header value dyanamically.

Thanks
-Deepak


AD Administrator Syncfusion Team April 22, 2007 09:19 PM UTC

Here is that sample modified to allow you to change the CheckBoxValue for the header cell in the GridDataBoundGrid from a button handler.


CB_in_Header_CS.zip

Loader.
Live Chat Icon For mobile
Up arrow icon