I need to use RadTreeView of telerik to show a tree of clients. Working with Nodes.Add is too slow and I would like to know an alternative to work using the DataSource of the tree and seting my query there.
my dto is:
public class DTOClient
{
public int Id {get; set;}
public int ParentId {get; set;}
}
Is it possible using Datasource ?
Following the provided information, I can suggest you two options:
Load data on demand: this feature helps reduce performance and memory costs incurred when all nodes are loaded at once. The following help article demonstrates a sample approach how to use it: https://docs.telerik.com/devtools/winforms/controls/treeview/data-binding/load-on-demand
Data binding to self referencing data: appropriate when you have a single collection of objects where each object has an ID and ParentID: https://docs.telerik.com/devtools/winforms/controls/treeview/data-binding/binding-to-self-referencing-data
I hope this information helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.