Greetings,
I am currently working on an ASP.NET WebForms application, which uses a Telerik RadTreeView.
The treeview uses has the tri state checkboxes active and gets populated server side. We first create a tree of stations (around 2500), which can contain other stations. After that, we populate the tree with datapoints by iterating over all stations and adding the datapoints with the Node.Add() Method.
So the structure is as follows:
Station
- Station 1
- Station 2
- Station 4
- DataPoint
- DataPoint
- Station 5
The checkboxes are used to show if any datapoint is already selected in the treeview and to select additional datapoints for a grouping.
There are multiple groups which can be switched between to see a different selection in the tree.
Therefore, it is necessary to add every datapoint that was already selected (and saved) to show the tri-state checkboxes correctly on page load.
After that a load on demand is possible.
What I tried so far:
- Loading the stations and inserting the datapoints (20k objects) before adding the root node to the RadTreeView
- Building the station tree is fast, but adding the root node to the RadTreeView Control takes about 600 seconds
Loading the stations and inserting the datapoints (20k objects) after adding the root node to the RadTreeView
Building the station tree is fast, but addings the nodes the the RadTreeView Control takes a long time
- Loading the stations and adding the minimal amount of datapoints to display everything checked correctly with tri state checkboxes
- Building the station tree is fast, but on every change of the grouping the tree will be walked completly to attach datapoints which were selected in the new grouping but where not present from the older groupings (or loaded on demand)
So my question is, is there a faster way to load about 20k objects into the tree, so on the change of grouping no new datapoints need to be loaded?
Or am I thinking this very wrong currently? Thank you in advance!