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 07:26 AM UTC

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 02:42 PM UTC

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

Loader.
Up arrow icon