简体   繁体   中英

winform/radtreeview/c#: using RadTreeview in winform with DataSource

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:

  1. 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

  2. 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM