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

GGC parent row from child

Hi, I''m using the GGC and I have a custom GroupCaptionCell with a button. How can I get a value of a parent row within TableControlCellButtonClicked event handler? Thank you

2 Replies

AD Administrator Syncfusion Team August 19, 2005 02:26 AM

Try code similar to this. private void gridGroupingControl1_TableControlCellButtonClicked(object sender, GridTableControlCellButtonClickedEventArgs e) { Console.WriteLine("gridGroupingControl1_TableControlCellButtonClicked"); GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex); if(style.TableCellIdentity.DisplayElement is GridCaptionRow) { GridCaptionRow capRow = style.TableCellIdentity.DisplayElement as GridCaptionRow; GridRecord rec = capRow.ParentChildTable.ParentNestedTable.ParentRecord as GridRecord; if(rec != null) { DataRowView drv = rec.GetData() as DataRowView; //if using DataTables otherwise use rec.GetValue Console.WriteLine(drv[1]); } } }

IV Ivan August 19, 2005 09:42 AM

Thank you. This is exactly what I was looking for!

Live Chat Icon For mobile
Up arrow icon