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

How to know the Parent Row of the GridGroupingControl

Thread ID:





90630 Oct 12,2009 09:41 AM UTC Oct 15,2009 12:31 PM UTC ASP.NET Web Forms (Classic) 1
Tags: Grouping
Asked On October 12, 2009 09:41 AM UTC

I'm using GridGroupingControl.I have two tables t1 and t2 which are related through the column "Description" .t1 is parent of t2.When I click on any DataGrid cell of child table, how can i know to which parent row it is related to?. The rows of parent table may contain the same child rows as other child row.

Thanks & Regards,

Rajadurai C [Syncfusion]
Replied On October 15, 2009 12:31 PM UTC

Hi Ramana,

Thanks for your interest in Syncfusion Products.

You can get the parent row details to which a particular child record belongs by accessing the DisplayElement. Please refer to the following code handled in TableControlCellClick event.

GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
if (style.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || style.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
if (style.TableCellIdentity.Table.TableDescriptor.Name == "ChildTable")
Element ele = style.TableCellIdentity.DisplayElement;
Element el = ele.ParentTable.RelationParentTable.CurrentElement;
Record r1 = el.GetRecord();
if(r1 != null)

This code triggers the message box with parent record details when a child record is clicked.




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