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

RadTreeNodeBinding and DataSet

3 Answers 67 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alexander Shashkin
Top achievements
Rank 1
Alexander Shashkin asked on 16 Sep 2011, 11:30 PM
Hi all,
Here http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/databindings/defaultcs.aspx I've read that I can bind different tables from data set to different levels. But I didn't found example with it and all my attempts failed.
My Db scheme: Category -> Item.
I want to show tree view like:

 cat1
 - item 1
 - item 2
 - item 3
 cat2
 - item 4

Right now I bind tree view from server side manually, but I want to use for example ObjectDataSource or SqlDataSource instead.

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 20 Sep 2011, 02:08 PM
Hi Alexander,

You can refer to this forum post where a similar issue has been discussed.

Hope this will  help.

All the best, Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Alexander Shashkin
Top achievements
Rank 1
answered on 20 Sep 2011, 02:34 PM
Hi Plamen,

Yes, you are right and question in this thread is very similar.
But I think that Nikolay Tsenkov didn't understand question. His example show another issue and can't be applied in my situation.
Again, I want to get something like:

 cat1
 - item 1
 - item 2
 - item 3
 cat2
 - item 4

Where level 0 should be bound to one table (categories) and level 1 to another (items). In example that I mentioned before there is next text: "You can even bind the nodes on each level of the treeview from different tables in a DataSet."
And I want to understand how I can do it, because all my tries failed.

0
Plamen
Telerik team
answered on 26 Sep 2011, 09:42 AM
Hi Alexander,

You can refer to DataBinding OverView help topic where is explained how to use the DataMember property and the Programmatic DataBinding where a RadTreeView is bound to a DataSet . Also you can use the code that was posted by Paul in the forum post that I sent before you and use change the binding at different depth level.

Hope this will be helpful.

Best wishes,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeView
Asked by
Alexander Shashkin
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Alexander Shashkin
Top achievements
Rank 1
Share this question
or