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

    Hi,

    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">
               <DataBindings>
                   <telerik:RadTreeNodeBinding TextField="Text" />
                   <telerik:RadTreeNodeBinding Depth="0" Checkable="false" TextField="Text2" Expanded="true"
                        />
               </DataBindings>
           </telerik:RadTreeView>
            
           
       <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:xxxx%>"
        SelectCommand="uspListRegionEcole" SelectCommandType="StoredProcedure"  />
  2. UI for ASP.NET Ajax is Ready for VS 2017
  3. Veronica
    Admin
    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.

    Greetings,
    Veronica Milcheva
    the Telerik team
  4. Chandrak
    Chandrak avatar
    12 posts
    Member since:
    Oct 2012

    Posted 13 Oct 2012 Link to this post

    Hi, 

    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.

    STATENAME -> STATECODE
    CITYNAME - > CITYCODE
    DEVICENAME -> DEVICECODE

    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.

    Thanks

  5. Bozhidar
    Admin
    Bozhidar avatar
    1102 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:
    http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-hierarchical.html
    http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-node-databound.html
    http://www.telerik.com/help/aspnet-ajax/treeview-data-binding-loading-related-tables.html
     
    Greetings,
    Bozhidar
    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
UI for ASP.NET Ajax is Ready for VS 2017