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.
else
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.
http://www.syncfusion.com/downloads/Support/DirectTrac/85957/GGCCheckbox-421602947.zip Please let me know if you have any further concerns.
Regards,
Ragamathullah B.