Treeview Styling

  • Thread starter Thread starter Mike Collins
  • Start date Start date
M

Mike Collins

I have six different treeview controls on my page. When selecting a different
tree I would like the previous tree's node to change its color back to the
unselected color but what I have tried does not seem to work. I am not seeing
any changes to the background color of the node in the previous tree. Can
someone help me with how to do this?
 
I have six different treeview controls on my page. When selecting a different
tree I would like the previous tree's node to change its color back to the
unselected color but what I have tried does not seem to work. I am not seeing
any changes to the background color of the node in the previous tree. Can
someone help me with how to do this?

Hi Mike

when you select the other trees node does it cause the page to post
back to the server
you all client side effect.?

if it post back to server you can change the previews trees node to
unselected on server...
a little code what you have tried would be appreciated ....

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Thanks for the reply. Below is what I have tried and it now works for
de-selecting the previous node, server side. The other thing I am trying to
get to work is the actual styling of the previous node. When a node is
selected, it is yellow, set in design time property. I am trying to change
the color back to its unselected color, but the code below is not changing it
at all. Just the de-selecting part is working.

string cssStyle = "color: #FFFFFF; background: none;
font-size:12pt;font-weight:bold;";
tvAccountSetup.SelectedNodeStyle.CssClass = cssStyle;

if (tvAccountSetup.SelectedNode != null)
tvAccountSetup.SelectedNode.Selected = false;
 
Back
Top