Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2008

Tip: Looking for answers? Try searching our database.

Treeview Styling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Collins - 27 Jun 2008 17:21 GMT
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?
Munna - 28 Jun 2008 06:21 GMT
On Jun 27, 10:21 pm, Mike Collins
<MikeColl...@discussions.microsoft.com> wrote:
> 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
Mike Collins - 30 Jun 2008 15:56 GMT
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;

> On Jun 27, 10:21 pm, Mike Collins
> <MikeColl...@discussions.microsoft.com> wrote:
[quoted text clipped - 20 lines]
> www.munna.shatkotha.com/blog
> www.shatkotha.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.