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.

Getting parent of selected record

Thread ID:





53860 Dec 21,2006 08:14 AM Dec 21,2006 11:13 PM Windows Forms 1
Tags: GridControl
Bill Langlais
Asked On December 21, 2006 08:14 AM

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 21, 2006 11:13 PM

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.

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.