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

Bind TreeView to XElement

1 Answer 90 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 20 Jul 2009, 03:05 AM
Hi There;

I'm trying to bind an System.Xml.Linq.XElement to a TreeView. Currently I'm using and XMLDataSource as an intermediary and converting the XElement to a string:

XmlDataSource1.Data = myXElement.ToString(); 
RadTreeView1.DataSource = XmlDataSource1; 
RadTreeView1.DataBind(); 

This works but surley there a more direct, cleaner way of doing this without converting the XElement ot a string?

Can anyone help please?

Thanks in advance

-Pete




1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Jul 2009, 07:35 AM
Hi Pete,

Currently RadTreeView does not support binding directly to XElement. Using an XmlDataSource is a viable workaround.

Regards,
Albert
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.
Tags
TreeView
Asked by
Pete
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or