The ASP.NET 2.0 platform provides an entirely new approach to data binding. This approach eliminates the coding necessary for connecting a control to its underlying data source. Telerik r.a.d.treeview employs this new way of accessing data, so that its data binding can be accomplished in a completely declarative manner using the new data source controls.
Declarative data source controls expose data from a back-end store (SQL database, middle-tier business object, XML file, XML Web Service) to a data-bound UI control on a page. Data source controls also provide new capabilities such as sorting, paging, caching, updating, inserting, and deleting data. UI controls can automatically use these features without any additional code.
Data Source Controls
Data source controls are not rendered, but instead represent a particular back-end data store. ASP.NET 2.0 includes the following server controls out-of-the-box: SqlDataSource, ObjectDataSource, AccessDataSource, SiteMapSource, XmlDataSource.
Currently Telerik RadTreeView supports the following data source controls:
- SiteMapSource - enables binding to the hierarchy exposed by an ASP.NET 2.0 site navigation provider.
The SiteMapDataSource control is associated to a data-bound control through the control's DataSourceID property. For general information on site navigation in ASP.NET, refer to the SiteMaps topic of this manual.
- XmlDataSource - Enables binding to an XML file or document.
XmlDataSource supports a DataFile property for specifying the path to an XML data file to be used as input. You may also specify a TranformFile property to apply an XSLT transformation to the data and an XPath property for specifying a subset of nodes to expose from the data source.
- For flat declarative data sources, such as SqlDataSource, AccessDataSource, and ObjectDataSource, you can either bind a flat treeview (consisting of root nodes only) or use an ID -> ParentID relation defined by the DataFieldID and DataFieldParentID properties.
Choosing the DataSource control
To enable data binding, you can use the property grid in Visual Studio 2005, as shown in the screenshot below:

See Also