Hierarchy not showing

4 posts, 1 answers
  1. Lucian Chiriac
    Lucian  Chiriac avatar
    13 posts
    Member since:
    Jun 2005

    Posted 27 May 2008 Link to this post

    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

  2. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 28 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lucian Chiriac
    Lucian  Chiriac avatar
    13 posts
    Member since:
    Jun 2005

    Posted 28 May 2008 Link to this post

    Thank you for the response. Looking forward for the next version :)
  5. John Billiris (JSBBS)
    John Billiris (JSBBS) avatar
    27 posts
    Member since:
    Mar 2007

    Posted 12 Jun 2008 Link to this post

    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.

    :-(
Back to Top