P
pej.odonnell
Hello everyone,
2 Issues: 1. When treeview renders all parent nodes are open? I want
it to render closed? 2. When I try to collapse programmatically, it
does not do anything?
I'm using a tree view with a sitemap to create a menu. The treeview
is contained in a master page.
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" ImageSet="Simple" Width="249px">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True"
ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True"
ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
<NodeStyle Font-Names="Tahoma" Font-
Size="10pt" ForeColor="Black" HorizontalPadding="0px"
NodeSpacing="0px" VerticalPadding="0px" / </asp:TreeView>
Here's the code I tried in the Page Load event of the Master page:
TreeView1.CollapseAll();
I would appreciate any suggestions. Thanks.
2 Issues: 1. When treeview renders all parent nodes are open? I want
it to render closed? 2. When I try to collapse programmatically, it
does not do anything?
I'm using a tree view with a sitemap to create a menu. The treeview
is contained in a master page.
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" ImageSet="Simple" Width="249px">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True"
ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True"
ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
<NodeStyle Font-Names="Tahoma" Font-
Size="10pt" ForeColor="Black" HorizontalPadding="0px"
NodeSpacing="0px" VerticalPadding="0px" / </asp:TreeView>
Here's the code I tried in the Page Load event of the Master page:
TreeView1.CollapseAll();
I would appreciate any suggestions. Thanks.