This is a migrated thread and some comments may be shown as answers.

Unable to load treeview

0 Answers 45 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Eric Klein
Top achievements
Rank 1
Eric Klein asked on 15 Feb 2011, 10:42 PM
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.

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Eric Klein
Top achievements
Rank 1
Share this question
or