Search code examples
syncfusion

Syncfusion GridGroupingControl, get the parent node from a child node


I use the syncfusion GridGroupingControl on which I databind an object. This object contains an array of another objet.

Person { Name, Lastname, Orders[] }

So in my gridgroupingcontrol I have

Persons
Name | Last
James| Doe
    Orders
    123524 | 12/15/2010 | stuffs
John | Smith
    Orders
    545541 | 12/31/2005 | stufffs

When I click on the order 123524 row of James Doe, I want to get the parent node which is James Doe.

I've tried everything like e.ParentChildTable.getData() e.ParentDisplayElement.getData() e.ParentGroup.getData() e.ParentSection.getData() e.ParentTable.getData() e.ParentTableDescriptor.getData()

most of the methods return null...

Whats the solution ?

Thanks guys !

John Smith


Solution

  • I found the answer, it's an OMG solution but it works !

    e.Record.ParentDisplayElement.ParentChildTable.ParentNestedTable.ParentRecord.GetData()