473,383 Members | 1,818 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,383 software developers and data experts.

Treeview - Recursive Search

Hi,
I am doing a recursive search of my treeview. All I am doing is iterating
through the nodes and checking if my tag = my id. It seems to works, finds
the ID, selects it and exits. However, it seem to add new nodes to my
TreeView (it pretty much adds the entire tree). I saw someone had a
similar problem in another newsgroup, however he had no explanation.
Any help would be great.

Dianna
'Initial Call
Iterate_Aux(treeEvents.Nodes(0), rdr("parent_id"))
'Recursive Search
Public Sub Iterate_Aux(ByRef theNode As TreeNode, ByVal id As String)
For Each theChildNode As TreeNode In theNode.Nodes
If theChildNode.Tag = id Then
treeEvents.SelectedNode = theChildNode
Exit Sub
End If
Iterate_Aux(theChildNode, id)
Next
End Sub

Feb 5 '06 #1
0 1432

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

Similar topics

0
by: imassadpk | last post by:
Hi all, Apprecite your help in resolving this tricky issue... I am trying implementing Recurrsive TreeView in MS. Access 2003 ADP project. So far, no luck :( The Problem: This sample...
2
by: Michael A. Covington | last post by:
I'm extending TreeView to build a file/directory chooser like the one in NTBACKUP. I've implemented four-state checkboxes; no problem. And I know how to explore files and directories and...
12
by: Bob Hollness | last post by:
Hi. I have a text file containing a list of files and their path. I.e. c:\MyDocs\File1.txt c:\MyDocs\File2.txt c:\MyDocs\File3.txt c:\MyDocs\File4.txt C:\MyDocs\Folder\File1.txt
1
by: AlexDP | last post by:
Hi I'm trying to do a text search on a TreeView control. So far I've been able to find the matching items and add them to another treeView but I want to be able to add its whole path to the other...
2
by: Don | last post by:
In a previous version of vb I used to save and load hierarchical data from an Access db into a treeview. But, I never found a very satisfying or elegant way to do it. I used a flat file approach...
0
by: Henry | last post by:
I am trying to create a TreeView control that works with an ADO Dataset DataTable or the new BindingSource stuff in .NET 2.0 to build a Treeview that is populated. This is what I came up with...
2
by: Norton Who | last post by:
Hi, Could I please ask if anyone could help me solve this problem in VS2003: I'm trying to count all the nodes that have a Checked state however this doesn't seem to be working for me. So...
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...
6
by: SQACSharp | last post by:
I'm using the EnumChildWindows API with an EnumChildWndProc callback to populate the treeview. The output will be something similar to spy+ + How can I specify the parent when adding a new node...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.