Like this:
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="XMLSalesDataSource" ExpandDepth="1" ShowLines="True"
EnableTheming="True" EnableViewState="False"
OnSelectedNodeChanged="TreeView1_SelectedNodeChang ed">
<DataBindings>
<asp:TreeNodeBinding DataMember="TREENODES"
TextField="text" />
<asp:TreeNodeBinding DataMember="treenode"
TextField="text" />
<asp:TreeNodeBinding DataMember="treenode1"
NavigateUrlField="NavigateURL" TextField="text"
ImageUrlField="imageURL" />
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="XMLSalesDataSource" runat="server"
DataFile="~/Documents/Sales/Filename.xml">
</asp:XmlDataSource>
TREENODES
treenode
treenode1
treenode1
treenode1
treenode
treenode1
treenode1
treenode1
The treenode1 is a link to a file, like a word doc, I am also having an
issue trying to launch to a target="_blank". I tried using the Target
property of the treeview control, but my guess is that means something
else. I had it working in 1.1 with the treeview there, but had to do a
lot more coding and I am trying to convert everything to 2.0.
Thanks.
John B wrote:
hartbypass wrote: Hello,
I have treeview control that I am populating with a XML file. The
structure is:
Treenode
Level 1
Item1
Item2
Item3
Level 2
Item1
Item2
Item3
I do not want Treenode (root node) to show up, only Level and Level 2
and their applicable items. This would not seem that it should be to
difficult, but I can not seem to find an answer to it.
Thanks,
Greg
How are you binding your xml to the treeview?
JB