This is a migrated thread and some comments may be shown as answers.

RadTreeView taking lot of time to bind data.

1 Answer 20 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sampath
Top achievements
Rank 1
Sampath asked on 17 Oct 2018, 02:44 PM

  <telerik:RadTreeView ID="RadTreeListUsers" runat="server" CheckBoxes="True" Width="585px" TriStateCheckBoxes="True" CheckChildNodes="True" meta:resourcekey="RadTreeListPermissionsResource1" />

 

var userValues = new HashSet<string>(users.Select(p => NodeValue.FormatTreeLabel(p.DataTypeName, p.ToDataTypeStateAutoId, p.ServiceAreaNum, p.OperationName, p.AttributeName)));

            var userNodes = GetUserNodes(userValues);
            RadTreeListUsers.Nodes.Clear();
            RadTreeListUsers.Nodes.AddRange(UserNodes);  //this line taking lot of time to load and display treeView


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 18 Oct 2018, 11:37 AM
Hi Sampath,

If there is a huge number of nodes, this operation should be expected to be expensive - it needs to create a lot of server controls, then render their HTML, and then send this over the wire, and then the browser has to parse and render it on the screen.

So, I would suggest you consider using load-on-demand: https://demos.telerik.com/aspnet-ajax/treeview/examples/programming/loadondemandmodes/defaultcs.aspx.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeView
Asked by
Sampath
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or