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

Selectively adding a checkbox to a cell based on how it is grouped.

Thread ID:





120641 Sep 29,2015 11:58 PM UTC Oct 2,2015 07:54 AM UTC WinForms 3
Tags: GridGroupingControl
David McDermid
Asked On September 29, 2015 11:58 PM UTC

Is there a way to do this? I found some examples using the QueryCellStyleInfo event but this require the Web assemblies and they don't appear to be installed on my machine. 

Solai A L [Syncfusion]
Replied On September 30, 2015 12:46 PM UTC

Hi David,

Thank you for using Syncfusion products. 

By default, we can add the checkbox to the cell by setting the celltype as checkbox. As per your requirement, we had done a simple customization of the GridGroupingControl containing the second column with the checkboxes. Also, specific cell from another column as checkbox (this customization is done using QuerCellStyleInfo Event). Please refer to the following sample, code and image.


Code :

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgse)


            GridTableCellStyleInfoIdentity id = e.TableCellIdentity asGridTableCellStyleInfoIdentity;

            Record record;

            if (id.DisplayElement.IsRecord())


                record = id.DisplayElement.GetRecord();

                if (e.TableCellIdentity.ColIndex==4 && id.TableCellType ==GridTableCellType.RecordFieldCell && record!=null && record.GetValue("Column3").Equals("row10col3"))


                    e.Style.CellType = "CheckBox";

                    e.Style.CellValueType = typeof(bool);

                    e.Style.CellValue = CheckBoxValue;

                    e.Style.ReadOnly = false;

                    e.Style.CellAppearance = GridCellAppearance.Raised;

                    e.Style.Enabled = true;



            e.Handled = true;


Sample : http://www.syncfusion.com/downloads/support/forum/120641/ze/CS886333781

To achieve it, only the following assemblies are required. If you have Essential Studio with WindowsForms platform installed, you can get all these from installed location. “C:\Program Files (x86)\Syncfusion\Essential

Studio\<installed Version>\Assemblies\4.0”.


Please let us know if you have any other concerns.

Thanks & Regards,

David McDermid
Replied On September 30, 2015 06:00 PM UTC

Thanks, works now. I was missing an imports and when I searched the help file it only pointed me to the web extension. 

Anish George [Syncfusion]
Replied On October 2, 2015 07:54 AM UTC

Hi David,
We are glad that your requirement has been achieved.
Please let us know if you need any further assistanece.


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

This page will automatically be redirected to the 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