Page view counter

hide child node but keep parent node selected

Last post 10-06-2008 4:02 AM by saif016. 3 replies.

Sort Posts:

  • hide child node but keep parent node selected

    01-15-2007, 3:18 PM
    • Loading...
    • trannguyen182
    • Joined on 12-13-2005, 1:52 PM
    • Posts 16
    • Points 70

    Old and similar question but couldn't find answer elsewhere. My simple menu is like this:

    Suppliers
    --Sub 1
    --Sub 2

    Within MenuItemDatabound event, I am able to remove Sub 1 and Sub 2 by using additional "visible" attribute in my Web.sitemap. However, I want to keep Suppliers selected so that users know they are still in Suppliers section. Unfortunately i can't find a good solution or any workaround for this. This is really irritating because my project has been delayed since this problem. Am I missing something simple?

     

    Thanks a lot
    --Tran

     

  • Re: hide child node but keep parent node selected

    01-16-2007, 5:30 AM
    Answer

    I'm presuming that doing

      e.Item.Parent.Selected =

    True

    doesn't work? It probably sets the selected, but that would also set the siteMapPath too. I haven't tried this, but it's what I'm guessing.

    Dave

  • Re: hide child node but keep parent node selected

    01-16-2007, 3:31 PM
    Answer
    • Loading...
    • trannguyen182
    • Joined on 12-13-2005, 1:52 PM
    • Posts 16
    • Points 70

    setting e.Item.Parent.Selected = True will make that particular node selected always even you are in another page. However, i found another workaround. I have an if statement to check if the current page url is the same with parent node's url. If so, set that parent node selected as you said.

     

  • Re: hide child node but keep parent node selected

    10-06-2008, 4:02 AM
    • Loading...
    • saif016
    • Joined on 10-06-2008, 4:00 AM
    • Posts 3
    • Points 2

    trannguyen182:

    setting e.Item.Parent.Selected = True will make that particular node selected always even you are in another page. However, i found another workaround. I have an if statement to check if the current page url is the same with parent node's url. If so, set that parent node selected as you said.

     

     

    please provide me the code, i'm stuck.......

Page 1 of 1 (4 items)