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

Add levels on different conditions

Thread ID:





118095 Jan 31,2015 05:10 AM UTC Feb 3,2015 09:26 AM UTC WinForms 3
Tags: GridGroupingControl
Asked On January 31, 2015 05:10 AM UTC

I am using gridgrouping control.
I want to create parent-child,child-grandchild and so on relationships.
I have multiple conditions by which I bind the control with different levels.
sometimes I have 2 levels, sometimes 3 levels and it is up to 6 levels structure in a single control.
Is there any possibility to pass level numbers and binding tables to a single function or class and 
then that class's code will automatically generate relation descriptors using the level numbers?

Thanks and regards,

Neelakandan Kannan [Syncfusion]
Replied On February 2, 2015 10:40 AM UTC

Hi Rasika,


Thank you for your interest in Syncfusion products.


We would like to let you know that we have already provided the Dashboard sample regarding manual relations at any level. In this sample, we have added table(child table) for Grid at various levels by specifying each table at specific index.


Code Snippet:

newList[0].ChildTables.Add("List0_Child0", list); //Adding child table at 0th position

newList[1].ChildTables.Add("List1_Child0", list); //Adding child table at 1st position

newList[3].ChildTables.Add("List3_Child0", list); //Adding child table at 3rd position


Dashboard Sample:

<Installation Location>\Syncfusion\EssentialStudio\<Product Version>\Windows\Grid.Grouping.Windows\Samples\Data Sources\Nested Child-Collection Demo\


Please let me know if you have any concerns.




Replied On February 2, 2015 11:32 AM UTC

Thank you for reply.
Could you send some sample code for this?


Neelakandan Kannan [Syncfusion]
Replied On February 3, 2015 09:26 AM UTC

Hi Rasika,


Thank you for your update.


Here we have provided the sample code as per your need. Please make use of below code and attached sample,


Code Snippet:

//The main list

list = new BaseClassList();

list.Add(new FirstClass(null, 0, "row0"));

list.Add(new FirstClass(null, 1, "row1"));

list.Add(new FirstClass(null, 2, "row2"));

list.Add(new FirstClass(null, 3, "row3"));

list.Add(new FirstClass(null, 4, "row4"));

newList = list;


#region Child Tables of List[0]

//First Child of List[0]-First level

list = new BaseClassList();

list.Add(new SecondClass(newList[0], 0, "row0_childtable0_row0"));

list.Add(new SecondClass(newList[0], 1, "row0_childtable0_row1"));

list.Add(new SecondClass(newList[0], 2, "row0_childtable0_row2"));

list.Add(new SecondClass(newList[0], 3, "row0_childtable0_row3"));

list.Add(new SecondClass(newList[0], 4, "row0_childtable0_row4"));

list.Add(new SecondClass(newList[0], 5, "row0_childtable0_row5"));

newList[0].ChildTables.Add("List0_Child0", list);


Please let me know if you have any concerns.




Attachment: Nested_ChildCollection_Demo_92c3c1ca.zip


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

or the page will be automatically redirected to 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