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

How to add child to Gridgrouping control

Thread ID:

Created:

Updated:

Platform:

Replies:

117506 Oct 31,2014 11:19 AM UTC Nov 3,2014 04:49 PM UTC WinForms 1
loading
Tags: GridGroupingControl
Rasika
Asked On October 31, 2014 11:19 AM UTC

Hi,
I am using Gridgrouping control.
I want to add child to a particular rowindex of gridgrouping control.
Please give me any solution for this issue.
 
Thanks and Regards,
Rasika

Muthukumar Kalyanasundaram [Syncfusion]
Replied On November 3, 2014 04:49 PM UTC

Hi Rasika,

Thank you for your interest in Syncfusion products.

If you want to add a child record to specific row in GridGroupingControl, you can use the “ChildTables.Add” method. The add method referred to the specific Key and Value to the dictionary. Please refer the below code,

Code:

  //The Parent 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;

//First Child of List[3]  ( add child to specific row )

            list = new BaseClassList();

            list.Add(new FirstClass(newList[2], 0, "row4_childtable0_row0"));

            list.Add(new FirstClass(newList[2], 1, "row4_childtable0_row1"));

            list.Add(new FirstClass(newList[2], 2, "row4_childtable0_row2"));

            list.Add(new FirstClass(newList[2], 3, "row4_childtable0_row3"));

            list.Add(new FirstClass(newList[2], 4, "row4_childtable0_row4"));

            list.Add(new FirstClass(newList[2], 5, "row4_childtable0_row5"));

            newList[2].ChildTables.Add("List3_Child0", list);      ( add child to Row as 2 )

Please let us know if you have any concern.

Regards,

Muthukumar K


Attachment: Parent_Child_relation_322c5a5b.zip

CONFIRMATION

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.

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

;