Treeview Styling

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?
 
M

Munna

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
 
M

Mike Collins

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top