Hi All, not sure this went through last time or not - sorry if the post is a duplicate. I am binding to an XML datasource. The source comes from the database, so it is not a static file. I can bind just fine using code similar to below:
:RadTreeView ID="rtvConflicts" runat="server"">
<telerik:RadTreeNodeBinding DataMember="nodeName" TextField="FirstName" Checkable="false" />
<telerik:RadTreeNodeBinding DataMember="parentNodeName" TextField="ID" Depth="0" Checkable="true" />
My problem is that I would like to bind multiple XML attributes to a single node. I have searched and seen some similar examples with different types datasources - but nothing for XML. I was hoping there was an easy solution. You will see above that my top level node (depth=0) shows just the ID. The rest of the nodes show the first name. I would like the rest of the nodes to show first AND last name....both which are attributes of the nodeName element in the XML datasource.
Can anyone guide me in the right direction?
I have already done something similar using NodeTemplate in conjuntion with <%# XPath("")%> on another page, but the problem is that the template does not seem to allow the top level nodes to be different than the next level down. I may have missed something obvious, but my workaround on that page is very messy and I needed to include an attribute in the XML specifying what level the node was. I hope there is an easier way to do this.