This is a migrated thread and some comments may be shown as answers.

Hierarchy not showing

3 Answers 103 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lucian Chiriac
Top achievements
Rank 1
Lucian Chiriac asked on 27 May 2008, 09:18 PM
Hello, i have the following problem:
Using the TreeView with a LINQ dataa source (hierarchical), the tree does not load correctly. Everything is shown as a list:

<telerik:RadTreeView ID="t" runat="server" DataSourceID="lnq" DataFieldID="CategoryId" DataFieldParentID="ParentId" DataTextField="Name"> </telerik:RadTreeView>

<asp:LinqDataSource ID="lnq" runat="server" ContextTypeName="BLA.DataContext"

OrderBy="Name" Select="new (CategoryId, Name, ParentId)" TableName="Categories">

</asp:LinqDataSource>


I really don't see what is the problem :(
This is a sample of the data (CategoryId, Name, ParentId)

1,"First node",

NULL

2,"TEST 2222",1

3,"Test 13453",2

4,"zuzud",3

Best regards,
Lucian

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 28 May 2008, 07:40 AM
Hi Lucian Chiriac,

Unfortunately at the time being RadTreeView does not support hierarchical binding to LinqDataSource. Binding via the DataFieldID/DataFieldParentID works only with Sql/AccessDataSource and when directly binding to DataTable, DataSet or DataView.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Lucian Chiriac
Top achievements
Rank 1
answered on 28 May 2008, 07:43 AM
Thank you for the response. Looking forward for the next version :)
0
John Billiris (JSBBS)
Top achievements
Rank 1
answered on 13 Jun 2008, 01:13 AM
Disappointing. I had a requirement for the very same hierarchical binding concept.

I don't wish to use a DataSet/DataTable/DataView, so it's now to be done the good ol' way... hand-coding.

:-(
Tags
TreeView
Asked by
Lucian Chiriac
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Lucian Chiriac
Top achievements
Rank 1
John Billiris (JSBBS)
Top achievements
Rank 1
Share this question
or