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

single column binding from XML problem

6 Answers 109 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Forumai
Top achievements
Rank 1
Forumai asked on 16 Mar 2009, 05:26 PM
Problem with single column binding. I am using RadtreeView binding it with XML (generated from web service on the fly) Like this:
...
webServices.WebService ws = new webServices.WebService();
this.trvNames.ItemsSource = ws.getNames();
...

my result row contains with 3 columns (NameId, Name, NameValue) and in tree view I see one value merged with 3 different values, I need that tree view will show me only Name. How to set to RadTreeView control to bind only from column / element Name value from code behind?.

Thanks in advance for a help.

F.

6 Answers, 1 is accepted

Sort by
0
Forumai
Top achievements
Rank 1
answered on 17 Mar 2009, 10:46 AM
is this forum alive?
0
Forumai
Top achievements
Rank 1
answered on 17 Mar 2009, 11:23 AM
is it possible to customize data binding from code behind in this telerik:radTreeView control. If yes please guide us how to do it. We are planning to replace our controls to teleric controls if they are fully customizable.

Thanks in advance.

F.
0
Tihomir Petkov
Telerik team
answered on 19 Mar 2009, 09:37 AM
Hi Forumai,

In order to achieve your scenario, you should use HierarchicalDataTemplate and DataTemplate. I am attaching a sample project which demonstrates how to do this. I hope this will help you resolve your issue.

Please let me know if you have further questions.

Sincerely yours,
Tihomir Petkov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Forumai
Top achievements
Rank 1
answered on 19 Mar 2009, 12:05 PM
Thanks for replay, but it is not solution in code behind. We need to have fully customizable controls from code behind (c#).

F.
0
Accepted
Tihomir Petkov
Telerik team
answered on 19 Mar 2009, 04:06 PM
Hi Forumai,

I updated the sample project to create the hierarchical templates in the code-behind. Please review it and let me know if it solves your problem.

Kind regards,
Tihomir Petkov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Forumai
Top achievements
Rank 1
answered on 19 Mar 2009, 04:56 PM
Thanks a lot. This solution in code behind fits to our needs.

F.
Tags
TreeView
Asked by
Forumai
Top achievements
Rank 1
Answers by
Forumai
Top achievements
Rank 1
Tihomir Petkov
Telerik team
Share this question
or