TreeView - Basic Setup - will not work

2 posts, 0 answers
  1. Nate
    Nate avatar
    26 posts
    Member since:
    May 2011

    Posted 11 Jul 2011 Link to this post

    For the TreeView, i am trying to set up through a datasoure.
    I have the following code within my .aspx file but I do not see the RadTreeView.
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadTreeView.aspx.cs"   %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
      
        protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
        {
      
        }
    </script>
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div>
          
            <telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="id_num" 
                DataFieldParentID="manager" DataSourceID="SqlDataSource1" DataTextField="fname" 
                DataValueField="fname">
            </telerik:RadTreeView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:nayan_alphametrixConnectionString2 %>" 
                SelectCommand="SELECT [id_num], [fname], [manager] FROM [TreeView]" 
                onselecting="SqlDataSource1_Selecting">
            </asp:SqlDataSource>
          
            <telerik:RadButton ID="RadButton1" runat="server">
            </telerik:RadButton>
          
        </div>
        </form>
    </body>
    </html>


    I am not sure what I am doing wrong. I am basically using the wizard for the datasource. Thank you.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Jul 2011 Link to this post

    Hello Nate,

    I cannot reproduce the issue locally. Please take a look at the following help article and demo and a make a double check with your code.
    Binding to ASP.NET DataSource Components.
    TreeView / Declarative DataSources.

    Thanks,
    Shinu.
Back to Top