有没有办法遍历所有the levels of treeview nodes
.
我有一个带有 xml 数据源的树视图:
<asp:TreeView ID="tv_products" runat="server" ImageSet="Events" DataSourceID="XmlDataSource1" OnSelectedNodeChanged="DirectoryTree_SelectedNodeChanged" ShowLines="True" OnDataBound="DirectoryTree_DataBound">
<DataBindings>
<asp:TreeNodeBinding DataMember="MenuItem" ImageUrl="~/images/folder.png" TextField="fullname" ValueField="maincode" ToolTipField="fullname" />
</DataBindings>
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="False" ForeColor="Red" />
<SelectedNodeStyle Font-Underline="True" Font-Bold="true" Font-Size="Small" HorizontalPadding="0px" VerticalPadding="0px" />
<NodeStyle Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" /></asp:TreeView>
如果可能,请举个例子?