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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Work with checkbox column in GridGroupingControl

Thread ID:





127740 Dec 6,2016 08:21 AM UTC Dec 8,2016 01:03 PM UTC WinForms 1
Tags: GridGroupingControl
Asked On December 6, 2016 08:21 AM UTC

gridGroupingControl1.TableDescriptor.Columns[i].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.CheckBox;
I have a gridgroupingcontrol which have checkbox column , four column READ,WRITE,UPDATE,DELETE have int value 

How i can click on checkbox, then set the value of this column , example : no check = 0 , checked = 1, i can not checked when click on this checkbox

How to add a checkbox on header column of READ,WRITE,UPDATE,DELETE, when checked on that check box , all of checbox in that column will be checked

Thank for your help !

Piruthiviraj Malaimelraj [Syncfusion]
Replied On December 8, 2016 01:03 PM UTC

Hi Truong, 
Thanks for your interest in Syncfusion products. 
We have analyzed your scenario and created the simple sample. To use the checkbox in column header and changed the check state dynamically, QueryCellStyleInfo, SaveCellText events can be used and changed the check state for whole column based on column header_ checkbox , TableControlCheckBoxClick event can be used. In order to change the “True” and “False” values as you wanted, CheckBoxOptions property can be used. Please make use of the below code, 
Code example: 
object cellValue = "0"; 
this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo); 
this.gridGroupingControl1.SaveCellText += new Syncfusion.Windows.Forms.Grid.GridCellTextEventHandler(gridGroupingControl1_SaveCellText); 
void gridGroupingControl1_SaveCellText(object sender, Syncfusion.Windows.Forms.Grid.GridCellTextEventArgs e) 
    GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Style; 
    if (style.Enabled && style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell) 
        cellValue = e.Text; 
        e.Handled = true; 
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) 
    if (e.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell && e.TableCellIdentity.Column.Name == "Column2") 
        e.Style.CellType = "CustomCheckBox"; 
        e.Style.CellValue = cellValue; 
     //To set '1' and '0' instead of "True" and "False" 
        e.Style.CheckBoxOptions = new GridCheckBoxCellInfo("1", "0", "", true); 
        e.Style.ReadOnly = false; 
        e.Style.Enabled = true; 
    e.Handled = true; 
Sample link: 
Please refer to below KB for further references, 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon