S
sunny076
Hi,
In my application, I use treeview inside a frame so when a tree node is
clicked, it will direct to the main content only. I have set the
selectednodeStyle with BackColor="Yellow", but when I selected the
first node and then sleect another the back color is still yellow for
the former one. The OnSelectedNodeChange event is never get fired.
Below is my code excerpt:
In TreePane.aspx
<div>
<asp:TreeView ID="TreeView1" runat="server"
CollapseImageUrl="~/Images/treeMinus.gif"
ExpandImageUrl="~/Images/treePlus.gif" Font-Names="Arial"
Font-Size="8pt" ForeColor="Black"
OnSelectedNodeChanged="OnSelectedNodeChange">
<NodeStyle HorizontalPadding="10px" />
<SelectedNodeStyle BackColor="Yellow" />
<Nodes>
<asp:TreeNode ImageUrl="~/Images/test1.ico"
NavigateUrl="~/Management.aspx"
Target="maincontent" Text="Management" Value="1">
<asp:TreeNode NavigateUrl="~/Accounting.aspx"
Target="maincontent" Text="Accounting"
Value="3"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode ImageUrl="~/Images/test2.ico"
NavigateUrl="~/Customer Services.aspx"
Target="maincontent" Text="Customer Services"
Value="2"></asp:TreeNode>
</Nodes>
</asp:TreeView>
</div>
On the default page.aspx:
<frameset frameborder="no" border="0" frameSpacing="0" frameBorder="0"
cols="220" MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0"
TOPMARGIN="0">
<FRAMESET rows="30,*">
<FRAME id="toolbar" src="HeaderPane.aspx" name="tooobar">
<FRAMESET MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0"
TOPMARGIN="0">
<FRAMESET cols="200,*" framespacing="0" frameborder="yes"
MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0">
<FRAME id="leftmenu" src="TreePane.aspx" name="leftmenu">
<frame id="maincontent" name="rightcontent" src="test1.aspx"
name="rightcontent">
</FRAMESET>
</FRAMESET>
</FRAMESET>
</frameset>
I would appreciate if anyone can help me with this problem.
Thanks in advance,
Sunny
In my application, I use treeview inside a frame so when a tree node is
clicked, it will direct to the main content only. I have set the
selectednodeStyle with BackColor="Yellow", but when I selected the
first node and then sleect another the back color is still yellow for
the former one. The OnSelectedNodeChange event is never get fired.
Below is my code excerpt:
In TreePane.aspx
<div>
<asp:TreeView ID="TreeView1" runat="server"
CollapseImageUrl="~/Images/treeMinus.gif"
ExpandImageUrl="~/Images/treePlus.gif" Font-Names="Arial"
Font-Size="8pt" ForeColor="Black"
OnSelectedNodeChanged="OnSelectedNodeChange">
<NodeStyle HorizontalPadding="10px" />
<SelectedNodeStyle BackColor="Yellow" />
<Nodes>
<asp:TreeNode ImageUrl="~/Images/test1.ico"
NavigateUrl="~/Management.aspx"
Target="maincontent" Text="Management" Value="1">
<asp:TreeNode NavigateUrl="~/Accounting.aspx"
Target="maincontent" Text="Accounting"
Value="3"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode ImageUrl="~/Images/test2.ico"
NavigateUrl="~/Customer Services.aspx"
Target="maincontent" Text="Customer Services"
Value="2"></asp:TreeNode>
</Nodes>
</asp:TreeView>
</div>
On the default page.aspx:
<frameset frameborder="no" border="0" frameSpacing="0" frameBorder="0"
cols="220" MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0"
TOPMARGIN="0">
<FRAMESET rows="30,*">
<FRAME id="toolbar" src="HeaderPane.aspx" name="tooobar">
<FRAMESET MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0"
TOPMARGIN="0">
<FRAMESET cols="200,*" framespacing="0" frameborder="yes"
MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0">
<FRAME id="leftmenu" src="TreePane.aspx" name="leftmenu">
<frame id="maincontent" name="rightcontent" src="test1.aspx"
name="rightcontent">
</FRAMESET>
</FRAMESET>
</FRAMESET>
</frameset>
I would appreciate if anyone can help me with this problem.
Thanks in advance,
Sunny