Telerik RadTreeView provides a convenient mechanism that allows you to define the structure of a treeview inline, directly in the ASPX/ASCX file. To do this you need to enclose every RadTreeNode definition within the <rad:radtreeview> and </rad:radtreeview> tags.

The inline definition of the treeview shown by the screenshot above looks like this:
| ASPX |
Copy Code |
|
<rad:radtreeview id="RadTreeView1" runat="server" ExpandDelay="10" Coll Skin="Arrows/3DBlue"> <Nodes> <rad:RadTreeNode runat="server" Text="root1"> <Nodes> <rad:RadTreeNode runat="server" Text="child1"> </rad:RadTreeNode> </Nodes> </rad:RadTreeNode> <rad:RadTreeNode runat="server" Text="root2"> <Nodes> <rad:RadTreeNode runat="server" Text="child2"> </rad:RadTreeNode> </Nodes> </rad:RadTreeNode> </Nodes> </rad:radtreeview> |
 |
The PostBack property can NOT be set declaratively (in the aspx file). |
You can use the Visual Studio designer and the Build RadTreeView command to define your treeview structure.
See Also