Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Community Forums > Telerik Trainer > binding to sqldatasource-treeview

Not answered binding to sqldatasource-treeview

Feed from this thread
  • Abdul Kadar avatar

    Posted on Jan 18, 2009 (permalink)

    Hi .,
    I want to bind a treeview with sql datasource.I use the below code.Pls guide me how to use parentid (I am using asp.net with vb)

     

    <telerik:RadTreeView ID="RadTreeView1" runat="server" DataSourceID="SqlDataSource1" DataTextField="DESCRIPTION" DataValueField="CODE"></telerik:RadTreeView>
    Using the above code, I got the output as 
                                

     

    o   Scanner ( description)

    o   Printer   ( description)

    o   Laptop   ( description)

          o   Cute FTp  ( description)

    o   Logmein  ( description

    Below is sql select query

     

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EsteeConnectionString %>"

     

     

    SelectCommand="SELECT [CODE], [DESCRIPTION],[MAINCATEGORY] FROM [BRANDMASTER]"></asp:SqlDataSource>

     


    I need the output as follows:

    Ø  Hardware     ( maincategory )

    o   Scanner ( description)

    o   Printer   ( description)

    o   Laptop   ( description)

    Ø  Software   (maincategory)

    o   Cute FTp  ( description)

    o   Logmein  ( description)

     




    Reply

  • Q1 Webinar Week

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Community Forums > Telerik Trainer > binding to sqldatasource-treeview