1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Aug 2007
    Rep Power

    Select (highlight) an item in treeview

    I have a treeview looking something like this


    I want to highlight an item, like item 5. How can I do this? If I add the attribute SelectedNodeStyle-CssClass="SelectedNodeStyle", nothing happens.

    if I add OnSelectedNodeChanged="TreeView1_SelectedNodeChang ed" with the following code:
    	protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
    		TreeView1.SelectedNode.Selected = true;
    In that case only the parentnode gets selected, like A, B or C, but not the item itself. How can I make visible what choise the user has made.
    Last edited by Will-O-The-Wisp; May 5th, 2015 at 10:21 AM.
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Columbus, OH
    Rep Power
    your question for .net forum, but check out atricle c# - How to highlight Tree path of selected node in TreeView control? - Stack Overflow
    it is explained pretty clear

    Comments on this post

    • Will-O-The-Wisp agrees
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

Similar Threads

  1. Select List Highlight Help
    By adam678 in forum HTML, JavaScript And CSS Help
    Replies: 3
    Last Post: October 9th, 2008, 02:14 PM
  2. Add item to select using window.opener
    By jamescw in forum ASP Development
    Replies: 1
    Last Post: August 15th, 2006, 04:36 AM
  3. Select(highlight) database values into a multiple ListBox
    By abbendix in forum .NET Development
    Replies: 1
    Last Post: July 6th, 2004, 08:28 AM
  4. Using SQL to 'select' a listbox item
    By Thisgirl in forum .NET Development
    Replies: 1
    Last Post: May 7th, 2004, 04:55 PM
  5. Replies: 0
    Last Post: March 15th, 2004, 03:36 PM

IMN logo majestic logo threadwatch logo seochat tools logo