Link to home
Create AccountLog in
Avatar of Soumen-Roy
Soumen-RoyFlag for India

asked on

Sorting problem in VB6

Hi Experts,

For some unknown reason the second level of my tree view is not sorting. Please help.

Regards
Sorting.zip
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Your project has a form with two trees and three buttons, labelled 'Load', 'Shuffle' and 'Sort'
'Load'  fills each tree with identical data that appears to be already sorted. 'Shuffle' seems to reload the same data in the same order, so it is hard to test the 'Sort'.
Avatar of Soumen-Roy

ASKER

thanx for your comment. But there u will find a problem. After sorting in the second level the sort is not working, u see
SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
I have given some screen shot of my requuirement and a notepad in the zip file. Can you please see those? Probably you will get some ideas
No I do not see. This is what I get after Load, Shuffle, Sort
Result.PNG
The items are in the correct alphabetic order. Are you saying that your code attempts to split off the numeric part and to sort on that?
You say "75083 and everything below it should be moved to the bottom of the tree". Why?
Please let me know if the screen shots and notepad are not sufficiant, i will try to explain it in some more picture
75083 - it is the largest integer, thats why it need to be at the bottom most location
Why aren't you using the Sorted property of the treeview?
The code looks pretty competent, so I guess that you are fairly skilled. At what point in the debugging are you having a problem?
Actually I am facing the sorting problem. The nodes should be sorted small to larger value at all levels, but I have failed to do that :-(
Why aren't you using the Sorted property of the treeview?
We understand that you think you have a problem with sorting, but you don't seem to be answering any of our questions directly.

Could you add some comments to your code, so we can see what is expected at each point?
Sorry, give me sometime. I will be commenting the source and send you again and also will mark the lines where I suspect the sorting is failing
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Why aren'y you answering my question?
Exactly, thanx i got the solution :-), in some other location, thanx experts