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

Treeview loading slowly

Thread ID:





129731 Mar 30,2017 05:10 PM UTC Mar 31,2017 12:06 PM UTC ASP.NET Web Forms 1
Tags: TreeView
Asked On March 30, 2017 05:10 PM UTC


I have a TreeView that loads very slowly taking about 5 seconds, attatched is a image of what the treeview looks like with around 350 nodes(The most nodes we ever would have is around 900), the code looks like this:

                                    ShowCheckbox="True" DataIsCheckedField="NodeChecked">

                        <asp:HiddenField ID="PracticeTestTreeViewCheckedList" runat="server"/>

OnNodeChecked and OnNodeUnchecked I just get a list of the ids and save them to the hiddenfield, so I have access to them on the code behind.
Those javascript methods look like this:

function onCheckProdNode(args) {
            var lstChecked = args.currentCheckedNodes;
            var arr = [];
            for (var i = 0; i < lstChecked.length; i++) {
                if (lstChecked[i].id > 0) {
            var valuefromHiddenField = document.getElementById('<%=PracticeTestTreeViewCheckedList.ClientID%>').value;
            if (valuefromHiddenField == "nothing") {
                document.getElementById('<%=PracticeTestTreeViewCheckedList.ClientID%>').value = arr.toString();
            } else {
                var arrOldItems = document.getElementById('<%=PracticeTestTreeViewCheckedList.ClientID%>').value.split(',');
                var newArr =  arr.concat(arrOldItems);
                document.getElementById('<%=PracticeTestTreeViewCheckedList.ClientID%>').value = newArr.toString();

I have tried to use loadOnDemand but that doesn't seem to work because if a parent node is selected it doesn't have the ids of the child nodes that were selected, because it is not expanded yet.

I previously had this in a asp treeview and there were no speed issues. I don't know if there is something else I can do to make the performance better?


Attachment: TreeViewImage_81a03826.zip

Ashokkumar Balasubramanian [Syncfusion]
Replied On March 31, 2017 12:06 PM UTC

Hi Gideon,              
The performance of the TreeView issue occurs due to the number of nodes with checked state, it takes time to render those nodes with checkbox and processing actions such as “parent node should be checked based on child nodes checked state, and child nodes checked state based on parent checked state”.  
However, we have logged “Need to improve the performance of TreeView control with checkbox enabled” as a feature request in our database to optimize the checkbox functionality for improving performance. We will implement this feature in any of our upcoming releases.  
Ashokkumar B.   


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