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

TreeGrid Paging / Virtualization

Hello. I am looking at your ASP.NET or ASP.NET MVC product and I have some questions about the TreeGrid control. 

The TreeGrid documentation lists "Virtualization" in the overview, but doesn't provide any details. How many rows of data are supported in a view and how does the virtualization work? Is there a concept of paging (based on first-level nodes)? For example, I have a table with approx. 27,000 rows I would like to display; the data is about 10% first-level with the rest being second-level children. 

The TreeGrid provides the visual concepts I would like (which is why I am not thinking about using the GridView), but I am worried about performance without a paging concept and without more details about virtualization. 

Thank you!

4 Replies

MK Mahalakshmi Karthikeyan Syncfusion Team April 16, 2015 01:13 PM UTC

Hi Matt Boyd,

Thanks for using Syncfusion product.

Query 1: How many rows of data are supported in a view and how does the virtualization work?

Solution: In Treegrid we can handle large number of rows of data along with multi-level hierarchies by using “EnableVirtualization” property. In virtualization mode the Treegrid control renders or we can able to visualize only few rows of data at a time ,depending upon the height of the Treegrid control (viewport/view height) , thereby increasing the responsiveness in Treegrid while scrolling, expanding ,collapsing and other such actions . In virtualization concept , the scrollbar or scroller of Treegrid is intended to render as if there are large number of rows of data, as in your case 27,000 rows for instance, but actually the rows which are viewable alone are rendered, even while scrolling the Treegrid content. You can achieve the virtualization in Treegrid with below code snippet

<form id="form1" runat="server">

<ej:TreeGrid ID="treegrid" runat="server" EnableVirtualization="true"



Query 2: Is there a concept of paging (based on first-level nodes)?

Solution: At present there is no support for paging the records in TreeGrid. We have already logged a feature request regarding this.

Currently we are working on the sample to render control with 27000 records. We will deliver the sample in 2 business days.

Please let us know if you require further assistance on this.


Mahalakhmi K.

MK Mahalakshmi Karthikeyan Syncfusion Team April 22, 2015 04:53 AM UTC

Hi Matt,

Apologize for the delay.

Currently we are facing some glitches in ASP.NET for rendering Treegrid with 27000 rows. We will fix this and deliver the sample for Treegrid with large data in ASP.NET soon. We would also like to inform you that here we have prepared JS sample with large number of rows and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/118852/Virtualization-1390174744.zip

Please let us know if you need more assistance on this.


Mahalakshmi K.

MB Matt Boyd April 22, 2015 12:44 PM UTC


Thank you for keeping me updated. The Javascript sample you provided works great! I look forward to the update to the ASP.NET product. 

Thank you, 

MK Mahalakshmi Karthikeyan Syncfusion Team April 24, 2015 10:23 AM UTC

Hi Matt,

Thanks for the update.

We glad to inform you that we have prepared sample to render the Treegrid with more than 27000 rows.

In our ASP.NET Treegrid,we have rendered all the html elements in clientside and we have passed the data to the control from serverside to clientside as Json data by serializing it. And we have used the defaultMaxJsonLengthvalue (2097152characters, which is equivalent to 4MB of Unicode string data) of the JavaScriptSerializer which is a fixed universal standard length for serializing the data, in our implementation.

SoWe have to create a custom serializer to serialize thedata Source, this can be done as follows.

Code Snippet:

protected void Page_Load(object sender, EventArgs e)


var DataSource = GanttDataSource.GetData();

DataManagerConverter.Serializer = new DMSerial();

this.Treegrid.Model.DataSource = DataSource;




public class DMSerial : IDataSourceSerializer


public string Serialize(object obj)


var str = Newtonsoft.Json.JsonConvert.SerializeObject(obj);

return str;




Please find the sample location below.

Sample: http://www.syncfusion.com/downloads/support/forum/118852/TreeGridVirtualization-818431948.zip

Please let us know if you want further assistance on this.


Mahalakshmi K.

Live Chat Icon For mobile
Up arrow icon