Find treenode by DataPath, not ValuePath

Discussion in 'ASP .Net' started by alexandis, Feb 1, 2008.

  1. alexandis

    alexandis Guest

    Hi,

    i use xml sitemap, several big parent node groups. In each parentnode
    tag i want to specify url as initial 'selected' url to go to when
    loading the page.
    So i have the following structure
    <siteMapNode url="dummyhome.aspx">
    <siteMapNode url="SectionA/Section1.aspx#" ... roles="user1,user2">
    <siteMapNode url="SectionA/Section1.aspx" ...>
    <siteMapNode url="SectionA/Section2.aspx" ...>
    <siteMapNode url="SectionA/Section21.aspx" ...>
    <siteMapNode url="SectionA/Section22.aspx" ...>
    ...
    </siteMapNode>
    <siteMapNode url="SectionB/Section1.aspx#" ... roles="user1">
    <siteMapNode url="SectionB/Section1.aspx" ...>
    ....
    </siteMapNode>

    SectionA has own selected node (last visited), SectionB - own and so
    on... - I use session array for this.

    BUT - the problem is when i want press sectionA (sectionB ...) picture
    and want imitate clicking on last-visited subnode of this section - i
    can't do it simply! I hoped on some method of treenode, but there's
    only FindNode, that for some reason works with ValuePath, not
    DataPath.
    I'd prefer to use DataPath because it's also unique and more
    understandable for user... and ValuePath is generated by system and I
    don't know what is ValuePath for each specific node :( Indicating URL
    would be much more easy for the user editing first-to-show nodes in
    web.sitemap
     
    alexandis, Feb 1, 2008
    #1
    1. Advertising

  2. alexandis

    alexandis Guest

    Ok, i may set ValueField="Url", but then ValuePath gathers all urls
    from all parents! What for, if url is unique across whole menu! :(
    Very strange...
    So, most likely i need to put own method FindNodeByUrl...
     
    alexandis, Feb 1, 2008
    #2
    1. Advertising

  3. alexandis

    alexandis Guest

    Well, I'm the fastest one :)
    I'm already writing my own FindByUrl recursive function. But how to
    loop via ALL treeview nodes, ignoring collapsing?
    When I use childNodes and some group is collapsed it considers there
    are no child nodes there, but it's not true, I need to check ALL nodes
    and I do not want to expand them programmatically, because if i don't
    find some node url i don't want to have fully expanded list and close
    everything back... :(
     
    alexandis, Feb 1, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. walala
    Replies:
    3
    Views:
    5,725
    walala
    Aug 30, 2003
  2. Replies:
    5
    Views:
    581
    Ray Andraka
    Mar 3, 2005
  3. tanya foster
    Replies:
    3
    Views:
    3,794
    tanya foster
    May 18, 2006
  4. Jared
    Replies:
    0
    Views:
    6,542
    Jared
    May 29, 2006
  5. Shenli

    Datapath design problem?

    Shenli, Jan 26, 2007, in forum: VHDL
    Replies:
    2
    Views:
    584
    Ray Andraka
    Jan 28, 2007
Loading...

Share This Page