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

Grouping & CheckBox Control

Thread ID:





101841 Nov 25,2011 09:23 AM UTC Dec 5,2011 07:42 AM UTC ASP.NET Web Forms (Classic) 1
Tags: Grouping
Dadasaheb Chobhe
Asked On November 25, 2011 09:23 AM UTC

I am add checkbox to the GrdiGroup Control. I want to change the state of checkbox in grouping. If Group contains 4 record, if i checked 4 records then it should be check group header checkbox and vice versa.

Thank you
Dadasaheb Chobhe

Ragamathulla B [Syncfusion]
Replied On December 5, 2011 07:42 AM UTC

Hi Dadasaheb,

Thank you for your interest in Syncfusio products.

You can change the checkbox status based on the parent table selection by using ‘TableControlCurrentCellChanging’ event. The following code explains the same.

void gridGroupingControl1_TableControlCurrentCellChanging(object sender, GridTableControlCancelEventArgs e)
GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell;
GridStyleInfo style = cc.Renderer.CurrentStyle;

if (cc.Renderer is GridCheckBoxCellRenderer)
CultureInfo culture = style.GetCulture(true);
// Load representations for True / False.
string strTrue = "", strFalse = "";
GridCheckBoxCellInfo ua = style.ReadOnlyCheckBoxOptions;
if (ua != null && ua.CheckedValue != null)
strTrue = ua.CheckedValue;
if (GridUtil.IsEmpty(strTrue))
strTrue = "1";
if (ua != null && ua.UncheckedValue != null)
strFalse = ua.UncheckedValue;
if (GridUtil.IsEmpty(strFalse))
strFalse = "0";
// Switch to next value
string strVal = style.Text;
// Checked to unchecked.
if (strVal.ToLower(culture) == strTrue.ToLower(culture))
strVal = strFalse;
// Unchecked to checked.
strVal = strTrue;
// Store value.
this.gridGroupingControl1.TableModel[cc.RowIndex, cc.ColIndex].Text = strVal;
this.gridGroupingControl1.Table.Records[0].NestedTables[0].Records[0].SetValue("Status", strVal);

Please refer to the following sample which illustrates the same.


Please let me know if you have any further concerns.

Ragamathullah B.


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