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

Getting parent of selected record

Thread ID:





53860 Dec 21,2006 01:14 PM UTC Dec 22,2006 04:13 AM UTC WinForms 1
Tags: GridControl
Bill Langlais
Asked On December 21, 2006 01:14 PM UTC

I have a nested GridGroupingControl and I am trapping the SelectedRecordsChanged event. I need to know the parent or the parent's parent when a record is selected in the fourth or fifth table/record in the nesting. I am using e->SelectedRecord->Record->Parent but it is Null even though I am not at the top level. How do I get the selected records parent record?



Administrator [Syncfusion]
Replied On December 22, 2006 04:13 AM UTC

Hi Bill,

Try the following code snippet to get the ParentRecord in SelectedRecordsChanged event.

private void gridGroupingControl1_SelectedRecordsChanged(object sender, SelectedRecordsChangedEventArgs e)
if( e.SelectedRecord != null )
ChildTable ctable = e.SelectedRecord.Record.ParentChildTable;
NestedTable ntable = ctable.ParentNestedTable;
if( ntable != null )
Console.WriteLine("ParentRecord is ===> " + ntable.ParentRecord);

Here is a sample.

Best Regards,


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