Hello,
I'm trying to bind the TreeView to hierarchical data in a table. I used ItemID and ParentID, but tree ignores hierarchy.
The tree displays all data as if it's on the root node.
Please help,
Michael
I'm trying to bind the TreeView to hierarchical data in a table. I used ItemID and ParentID, but tree ignores hierarchy.
| <telerik:RadTreeView ID="RadTreeView1" Runat="server" |
| DataSourceID="LinqDataSource1" DataFieldID="ItemID" DataFieldParentID="ParentID" |
| DataTextField="Title" EnableAjaxSkinRendering="true" Skin="Default" |
| CausesValidation="False" EnableDragAndDrop="True" |
| EnableDragAndDropBetweenNodes="True" MaxDataBindDepth="25" |
| SingleExpandPath="True" Width="350px" > |
| <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> |
| <ExpandAnimation Duration="100"></ExpandAnimation> |
| </telerik:RadTreeView> |
| <br /> |
| <br /> |
| <asp:LinqDataSource ID="LinqDataSource1" runat="server" |
| ContextTypeName="DataClassesDataContext" OrderBy="ParentID, SortOrder" |
| TableName="Items" Where="ClientID == @ClientID"> |
| <WhereParameters> |
| <asp:ControlParameter ControlID="DropDownList1" DefaultValue="1" |
| Name="ClientID" PropertyName="SelectedValue" Type="Int64" /> |
| </WhereParameters> |
| </asp:LinqDataSource> |
The tree displays all data as if it's on the root node.
Please help,
Michael