Link to home
Start Free TrialLog in
Avatar of Compmind
Compmind

asked on

How do I sort a listview by a specific column in Visual Basic 2005?

I want to be able to sort a ListView by a specific column in Visual Basic 2005. Microsoft has an article for it at http://support.microsoft.com/kb/319399 but the instructions for doing this in Visual Basic 2005 are lacking. What modifications should I make to make the article code work? Or any other suggestions?
Avatar of divinewind80
divinewind80

My suggestion would be to change your SQL statement to ORDER by your field and then refresh the ListView.  Will this work for you?

Avatar of Compmind

ASKER

I am not using a binded Listbox and it is not related to an Specific table in the database so no it wouldn't work
Is this static data?  Otherwise, can you show the code for retrieving your data?
nope it is dynamic data that is retrieved from the contents of a form
the data looks somewhat like this

Some group
Detail                                                     Location
Some detail here                                          AF

I want to sort by the location column
Nobody has so far been able to answer thi question please proceed to closing it
ASKER CERTIFIED SOLUTION
Avatar of Compmind
Compmind

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial