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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC parent row from child

Thread ID:





33401 Aug 18,2005 07:35 PM UTC Aug 19,2005 02:42 PM UTC WinForms 2
Tags: GridControl
Asked On August 18, 2005 07:35 PM UTC

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 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]); } } }

Replied On August 19, 2005 02:42 PM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon