You can use a wide variety of data-sources for RadTreeList structure generation. A requirement is that these custom objects implement
the ITypedList/IEnumarable/ICustomTypeDescriptor
interfaces and representing self-hierarchical data. Remember to set the DataKeyNames and ParentDataKeyNames properties of the
RadTreeList controls.
Note that the type of the fields used for DataKeyNames and ParentDatakeyNames should be the same.
The code under the
ASPX/C#/VB.NET tabs demonstrates how to:
- use List of custom objects with Nullable properties
- bind RadTreeList to list of custom objects (Generic list)
- bind RadTreeList to a DataReader
- bind RadTreeList to a SiteMapDataSource
When binding to SiteMapDataSource control you can avoid setting the DataKeyNames and the ParentDataKeyNames because they are resolved internally due to the nature of this datasource type.
Related Resources
Binding RadTreeList to various data sources