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. Image for the cookie policy date

Grid Grouping - Basic display of Parent & Child table

Hi All,

Struggling here.
Basically i have two tables
1 contains Parent Accounts
1 contains Sub Accounts
In table 2 (sub accounts) there is the column "Parent" which lists the parent account number. Of course there are mutliple Sub accounts per Parent account.
I have been trying but failing to display in a Grid Grouping.
To list all the Parent accounts, then as a child table by parent account number all the sub accounts.(so when someone expands the parent account it lists the sub accounts)
Using .net and data comes from Stored Procedures.
Can anyone help me here on how this can be achieved?
I hope this makes sense.
Thanks in advance.

1 Reply

MG Mohanraj Gunasekaran Syncfusion Team June 15, 2017 10:27 AM UTC

Hi Alex,   
   
Thanks for using Syncfusion product.   
   
In order to create the child table for each parent record, you can use the TableDescriptor.Relations property. By default, the GridGroupingControl will create a relation (RelatedMasterDetails) for each DataRelation found in a DataSet. So, you can create the relation in DataSet and bind that DataSet with GridGroupingControl by using DataSource property.   
   
Please refer the below UG link,   
   
Dashboard Sample location: <Install_Location>\Syncfusion\EssentialStudio[Version_Number]\Windows\Grid.Grouping.Windows\Samples\Relation and Hierarchy   
 
Regards,   
Mohanraj G   


Loader.
Up arrow icon