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

Ttreeview from dataset with 2 datatables

2 Answers 70 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Victoria F
Top achievements
Rank 1
Victoria F asked on 22 Aug 2010, 03:15 AM

Requirements

RadControls version

 

.NET version

 

Visual Studio version

 

programming language

 

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
 I have problems with Rad treeview:
I have a dataset that contains 2 datatables.
First table : Parent_ID , Parent_Text
Second table : Parent_ID, CHild_ID, Child_Text

 

 

DataColumn parentColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerWin"].Columns["Layer"];

 

 

 

DataColumn childColumn = gl_dsLayerLOBsWIN.Tables["PriceLayerLOBWin"].Columns["Layer"];

 

 

 

DataRelation relation = new DataRelation("parent2Child", parentColumn, childColumn);

 

gl_dsLayerLOBsWIN.Tables[

 

"PriceLayerLOBWin"].ParentRelations.Add(relation);

 

radGridView_Layers.DataSource = gl_dsLayerLOBsWIN.Tables[

 

"PriceLayerWin"];

 


radTreeView_Layers.RelationBindings.Add(

 

new RelationBinding("PriceLayerWIN_PriceLayerLOBWIN", gl_dsLayerLOBsWIN));

 

radTreeView_Layers.DataSource = gl_dsLayerLOBsWIN;

 Initially Dataset is empty. When I add a row to Parent datatable and a couple of rows to Child Datatable I see only first level node(s)....  I do not see sublevels.
Could you , please help me with this.
I tried to use Gridview for this purpose also and tried to group it, but I still do not see any data for sublayers .. may be I'm missing something ...

Thank you ,
Victoria.


2 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 25 Aug 2010, 04:48 PM
Hi Victoria,

Thank you for writing.

Please refer to the attached sample application. It contains projects that demonstrate how to bind RadTreeView to a data set with related tables as well as to custom related objects. The projects are in both C# and VB.

A bit off topic, please submit your enquiries in the appropriate forum sections or in the support ticketing system. The Code Library secion is a place for exchanging code samples, sharing knowledge and getting hands-on experience.

Thank you for your understanding.

All the best,
Victor
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stefan
Telerik team
answered on 22 Mar 2011, 03:20 PM
Hello Victoria F,

Please note that in Q1 2011 we have introduced a major upgrade of RadreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post.

Regards,
Stefan
the Telerik team

Tags
Treeview
Asked by
Victoria F
Top achievements
Rank 1
Answers by
Victor
Telerik team
Stefan
Telerik team
Share this question
or