RadTreeView data binding problem

5 posts, 0 answers
  1. Luc Émond
    Luc Émond avatar
    26 posts
    Member since:
    Jun 2010

    Posted 25 Mar 2011 Link to this post


    I probably missing something put when i try to use the RadTreeView for databinding there nothing showing!
    The page is blank
    Any idea??

    Is there something i am missing or is there a bug?
    I try the same thing in code behind with the same result!
    Any tips or advise are welcome

    Tks in advance

    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
           <telerik:RadTreeView runat="server" ID="RadTreeView1" DataSourceID="SqlDataSource1"
               DataFieldID="id" DataFieldParentID="parentID" CheckBoxes="true">
                   <telerik:RadTreeNodeBinding TextField="Text" />
                   <telerik:RadTreeNodeBinding Depth="0" Checkable="false" TextField="Text2" Expanded="true"
       <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:xxxx%>"
        SelectCommand="uspListRegionEcole" SelectCommandType="StoredProcedure"  />
  2. Veronica
    Veronica avatar
    1213 posts

    Posted 29 Mar 2011 Link to this post

    Hello Luc Émond,

    I'm glad that you were able to find the solution on your own.

    Please let me know if you have further questions.

    Veronica Milcheva
    the Telerik team
  3. Chandrak
    Chandrak avatar
    16 posts
    Member since:
    Oct 2012

    Posted 13 Oct 2012 Link to this post


    I am evaluating latest downloaded Telerik controls. Will be buying them within 1 month or so. My question is for the TreeView data binding.

    I am having these fields from SQL database.


    Now I want TreeView to bind in such a way that STATENAME becomes parent, CITYNAME becomes Child and DEVICENAME becomes grand Child. Can you please let me know how to do that with properties of the tree control? What if depth goes more?

    I also want each CODE to be assigned to each respected field so that when user will select any node using context menu I should get the code of the selected node. 

    I am new to Rad controls so please let me know descriptive explanation with code.


  4. Bozhidar
    Bozhidar avatar
    1189 posts

    Posted 16 Oct 2012 Link to this post

    Hello Chandrak,

    Please review the following help articles, which explain in detail how you can bind the TreeView to different types of database tables:
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top