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.
Unfortunately, activation email could not send to your email. Please try again.

GGC parent row from child

Thread ID:





33401 Aug 18,2005 03:35 PM Aug 19,2005 10:42 AM Windows Forms 2
Tags: GridControl
Asked On August 18, 2005 03:35 PM

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

Administrator [Syncfusion]
Replied On August 19, 2005 03: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]); } } }

Replied On August 19, 2005 10:42 AM

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.