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.
Unfortunately, activation email could not send to your email. Please try again.

TreeGrid Paging / Virtualization

Thread ID:

Created:

Updated:

Platform:

Replies:

118852 Apr 15,2015 02:11 PM Apr 24,2015 06:23 AM ASP.NET Web Forms 4
loading
Tags: TreeGrid
Matt Boyd
Asked On April 15, 2015 02:11 PM

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!

Mahalakshmi Karthikeyan [Syncfusion]
Replied On April 16, 2015 09:13 AM

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"

//...

</ej:TreeGrid>



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.

Regards,

Mahalakhmi K.


Mahalakshmi Karthikeyan [Syncfusion]
Replied On April 22, 2015 12:53 AM

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.

Regards,

Mahalakshmi K.


Matt Boyd
Replied On April 22, 2015 08:44 AM

Mahalakshmi, 

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, 
Matt

Mahalakshmi Karthikeyan [Syncfusion]
Replied On April 24, 2015 06:23 AM

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;

this.Treegrid.DataBind();

}

//...

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.

Regards,

Mahalakshmi K.


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.

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.

;