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 / February 2008

Tip: Looking for answers? Try searching our database.

Find treenode by DataPath, not ValuePath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alexandis - 01 Feb 2008 14:58 GMT
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 - 01 Feb 2008 15:38 GMT
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 - 01 Feb 2008 17:11 GMT
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... :(

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.