• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2595
  • Last Modified:

Sorting using ListView Control in Visual Basic 6.0

hi
  i have a listview control in visual basic 6.0 with item values containing numbers ex. 1, 2, 3, 4, 5 , 10, 100, when i try to sort by clicking a column header the sort arrangement is like this 1,10,100,2,3,4,5. i just want to know know how would i make the sort like this 1,2,3,4,5,10,100 using listview control.

  thanks.
0
nolram
Asked:
nolram
  • 2
1 Solution
 
Shiju SasidharanCommented:
0
 
Shiju SasidharanCommented:
0
 
rcruxCommented:
When you add a listitem make shure tha the number is inserted in string format with spaces on the left.

ListView1.ListItems(1).Text=format("1","@@@@@@")

@ should be repeated n times (as the max number chars you estimate needing)
the example abouve only woks for numbers between 0 and 999999.

hope to be of help
0
 
nolramAuthor Commented:
thanks so much.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now