473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Find treenode by DataPath, not ValuePath

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
Feb 1 '08 #1
2 2817
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...
Feb 1 '08 #2
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... :(
Feb 1 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phil | last post by:
Hi There. Seriously stuck and need help! I am trying to access Access 2000 database using ASP.NET(VB) and I am getting a "Could not find installable ISAM" crap. There are quite a few resources...
5
by: Jeroen Ceuppens | last post by:
I need to put a new node at the end of the tree, that end is not te lowest in de list but the deepest (the one with the most + before it) Node A Node 1 Node 2 Node 3 Node 4: Deepest Node B:...
0
by: Shafia | last post by:
Hi, How to find a node in a .Net framework TreeView like we do in Web TreeView as follows TreeView1.FindNode(myNode.ValuePath) There is a method TreeNode nn = treeView1.Nodes.Find(Key,...
1
by: sklett | last post by:
I know, I know... it's rarely the case. But here is a SIMPLE example of it not working: TreeNode temp = configNode.Nodes.Add("TestNode"); TreeNode findResult = configNode.Nodes.Find("TestNode",...
2
by: engelit.junk | last post by:
Hi, If you look at TreeNodeCollection.Find Method, you'll see: Finds the tree nodes with specified key, optionally searching subnodes. public TreeNode Find ( string key, bool...
0
by: jiing | last post by:
Hi all, I want to use sting(the same as Node.Text) to judge if a node exists in TreeView. I've tried several ways, but seems all failed. could anybody help me? Thanks in advance. //My...
3
by: Jeff | last post by:
Hey ..NET 2.0 I'm trying to search a TreeView control for a specific TreeNode The code below doesn't work because it only searches the the top level of the nodes. I would like to program it...
1
by: JR | last post by:
Hi, I need a routine/finction that finds a text, starting at the selected node, where a given text is in. say i have some nodes with 1 'sonday' and another with 'son' and I look for 'so' it...
2
by: slizorn | last post by:
hi guys, i need to make a tree traversal algorithm that would help me search the tree.. creating a method to search a tree to find the position of node and to return its pointer value basically i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.