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. Image for the cookie policy date
close icon

Checkbox column in gridGroupingControl

Hi All,

I have GridGroupingControl in that one column as checkbox and it also bounded to datasource column,my problem while clicking on checkbox,i am checking the datasource of that column value it does n't got changed, but again click another row same column then only the value got changed.

I want to update the datasource each and every click of checkbox.

Can you please help me how do i achive this as soon as possible because it is very very urgent for me.

Thanks and Regards
K.Sathishkumar.

5 Replies

AD Administrator Syncfusion Team February 1, 2007 03:31 PM UTC

Hi SathishKumar,

You can hanlde the TableControlCellChanged event and call Table.Endedit method to push the changes to the underlying datasource. Here is a code snippet.

private void gridGroupingControl1_TableControlCurrentCellChanged(object sender, GridTableControlEventArgs e)
{
GridCurrentCell cc = e.TableControl.CurrentCell;
if( cc.Renderer.CurrentStyle.CellType == "CheckBox")
e.TableControl.Table.EndEdit();
}

Best Regards,
Haneef


SK Sathishkumar Kaliavaradhan February 1, 2007 04:18 PM UTC

Hi Haneef,

Thanks for your answers,

I have another question i have checkbox in group header and i handling that in "gridGroupingControlPoints_TableControlCheckBoxClick"
event and below is my code.

for (int i = 3; i < e.TableControl.Table.DisplayElements.Count; i++)
// {
// Record rec = e.TableControl.Table.DisplayElements[i].GetRecord();
// rec.SetValue("AddToTrend", !(bool)style.CellValue);
// }

i am using setValue() function for setting the value to the below records checkbox column,

my problem is it taking too much time for me and CPU usage as 100 %

How do i solve this problem ?

Waiting for your reply...

Thanks and Regards
K.Sathishkumar




AD Administrator Syncfusion Team February 1, 2007 05:53 PM UTC

Hi Sathishkumar,

Please try the attached sample and let me know if you are looking something different.
GGC_GroupCheckBox_6e48b0a2.zip

Best Regards,
Haneef


JB James Blibo July 23, 2007 07:17 PM UTC

If I have ShowRowHeader set to false for my grid, is it possible for me to place the group check box in the group caption cell?


HA haneefm Syncfusion Team July 23, 2007 10:49 PM UTC

Hi James,

Below is a minimal sample that shows you "How to add checkbox in a groupcaption cell of the grid?". Please refer this and let me know if this helps.
GroupCaptionCheckBox.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon