GGC Edit Mode

I have GGC which has a checkbox in a column in the Parent table. After clicking on the checkbox I am updating a record unrelated to the GGC datasource. My issue is, the GGC indicates it is in edit mode unless i press return after clicking on the checkbox. I would like to get the GCC out of edit mode after clicking on it.
Thanks

2 Replies

AD Administrator Syncfusion Team July 31, 2006 11:02 AM UTC

Hi JMS,

To resolve this issue, you need to handle the TableControlCurrentCellChanged event and call the Table.EndEdit() method. Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridCheckBoxCellRenderer cr = cc.Renderer as GridCheckBoxCellRenderer;
if( cr != null)
{
cc.EndEdit();
e.TableControl.Table.EndEdit();
}
}

Let me know if this helps.
Best Regards,
Haneef


AD Administrator Syncfusion Team July 31, 2006 01:15 PM UTC

Thanks, Worked perfect.

>Hi JMS,

To resolve this issue, you need to handle the TableControlCurrentCellChanged event and call the Table.EndEdit() method. Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
GridCheckBoxCellRenderer cr = cc.Renderer as GridCheckBoxCellRenderer;
if( cr != null)
{
cc.EndEdit();
e.TableControl.Table.EndEdit();
}
}

Let me know if this helps.
Best Regards,
Haneef

Loader.
Up arrow icon