Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort ListView, Grid OR ANYTHING!!!

Status
Not open for further replies.

Serenades

Programmer
Oct 3, 2001
21
SE
Hi!

I have a ListView with 14 columns and now i want to sort them!
I can sort it on one column, for example column no 4.
But i want to sort my data in this column order: 0,11,1.
I cant find any usefull information on how this can be done, do i need to replace the ListView with some other control if so, how do i sort the new control like this...

Thanks
-Robert-
 
Sounds like you need to store your data in an array to be sorted and re displaied to your list view.
 
Ok, i was afraid of that!
You dont have any example on how this could be done?

-Robert-
 
It is my experience that MS does not lose the order of duplicates when sorting so sort the columns in reverse order, one at a time. You will be amazed. Happliy I hope. Maybe make the control invisible while sorting. Also, have you considered that a colwidth=0 makes the column invisible? If you were to concatenate the sort fields into one column then sort on that column.....
Then again you can try my ... or not. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
It worked when i sorted one column after another!
Saved me a lot of time!
Thanks a lot!

-Robert-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top