Unable to load treeview

1 posts, 0 answers
  1. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 15 Feb 2011 Link to this post

    I have a tree view on my screen
    <telerik:RadTreeView ID="RadTreeView1" runat="server" >
                 <DataBindings>
                  <telerik:RadTreeNodeBinding Depth="0" Expanded="true" />
              </DataBindings>
    </telerik:RadTreeView

    And I am adding the data from the code behind

    var nData = from p in db.PeforrmanceDatas
            where p.PerformanceGroup.FundFamilyID == Int32.Parse(Request.QueryString["ffid"])
                            select new
                            {                            
                                p.PerformanceGroup.PerformanceGroupName,
                                p.Class,
                                p.ClassID
                            };
      
                RadTreeView1.DataTextField = "Class";
                RadTreeView1.DataFieldID="ClassID";
                RadTreeView1.DataFieldParentID = "PerformanceGroupName";
                RadTreeView1.DataSource = nData;
                RadTreeView1.DataBind();


    If I do not include the DataFieldParentID it will load a single level tree but when I add the hierarchy it will not load the treeview.
Back to Top