|
-
June 14th, 2001, 04:36 AM
#1
TreeView Sort bug ?
after sorting a treeview when we loop through the nodes in code it still follows the original order!!!! any way around it....
I need to sort the treeview and process in the sorted order...help
vivek
-
June 14th, 2001, 04:27 PM
#2
Re: TreeView Sort bug ?
What do you mean by "sort"?
Do you mean Node.Sorted = True
-OR-
do you have some of your own sorting code?
if you have a Node.Sorted = True issue
and want the child nodes in sorted order try something like
set Nodx = NodeYouSorted.Child
set Nodx = Nodx.FirstSibling
Do While Not (Nodx Is Nothing)
' we should be moving through the nodes in ascending order now
List1.AddItem Nodx.Text & " " & Nodx.Index
Set Nodx = Nodx.Next
Loop
The FirstSibling and Next syntax will give you a top down output
of what you see displayed.
-
June 15th, 2001, 03:51 AM
#3
Re: TreeView Sort bug ?
thanks.
Sorted=true,yes.
It doesnt work if i use a...
For each node in tree.nodes
next
vivek
-
June 15th, 2001, 09:34 AM
#4
Re: TreeView Sort bug ?
The problem with the
For each node in tree.nodes
next
syntax is that it's order is set by the Nodes collection in the tree, and will most likely look like the order the Nodes were added to the Tree.
How many levels deep is your tree?
It seems that if you want ALL of the Nodes to be part of the sort, that
a one level deep tree would work for you, more like a List.
Please email me with info/comments, I'll be happy to help.
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|