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

Three-Level Hierarchy

Thread ID:





103761 May 29,2012 08:24 PM UTC May 30,2012 06:13 AM UTC ASP.NET Web Forms (Classic) 1
Tags: GridGroupingControl
Administrator [Syncfusion]
Asked On May 29, 2012 08:24 PM UTC

Hi guys,

we use the gridgroupingcontrol for display data in 3-level-hierarchy. We need to know how to expand or collapse child-records depends on data. I mean some child should expand and some should be collapsed when loading data.

Further we need to know how to refresh child - tables, when data is added or deleted, without refreshing all data.

we are grateful for your support.

p.p.Tuong Trinh

Ranjithkumar R G [Syncfusion]
Replied On May 30, 2012 06:13 AM UTC

Hi Tuong,


Thanks for using Syncfusion products.


Query#1:”Expand/Collapse based on condition”


We suggest you to expand all records in the Hierarchy Grid in the QueryCellStyleInfo event and then collapse the records based on some condition by handling RecordExpanded event. Please refer to the code snippet below to achieve this.




void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)


        if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordPlusMinusCell)


            Record r = e.TableCellIdentity.DisplayElement.ParentRecord as Record;


            r.NestedTables[0].ParentTable.ExpandAllRecords();//Expanding all records of the Parent table





    void GridGroupingControl1_RecordExpanded(object sender, RecordEventArgs e)


        if (e.Record.GetValue("ParentName")!=null && e.Record.GetValue("ParentName").ToString() == "parentName0")



            e.Record.IsExpanded = false// Collapsing the record of Parent Table with the value 'parentName0'





Query#2:” Refreshing only child table”


We would like to let you know that refreshing child grid only when it’s data is added/edited cannot be achieved in our current implementation.  Adding/Modifying data in Child Table will refresh the whole grid.


Please refer to the below link to download the sample application.




Please let us know if you  have any concern.





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

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