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

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?
0
Compmind
Asked:
Compmind
  • 5
  • 2
1 Solution
 
divinewind80Commented:
My suggestion would be to change your SQL statement to ORDER by your field and then refresh the ListView.  Will this work for you?

0
 
CompmindAuthor Commented:
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
0
 
divinewind80Commented:
Is this static data?  Otherwise, can you show the code for retrieving your data?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
CompmindAuthor Commented:
nope it is dynamic data that is retrieved from the contents of a form
0
 
CompmindAuthor Commented:
the data looks somewhat like this

Some group
Detail                                                     Location
Some detail here                                          AF

I want to sort by the location column
0
 
CompmindAuthor Commented:
Nobody has so far been able to answer thi question please proceed to closing it
0
 
CompmindAuthor Commented:
I ended up reordering the data myself before doing the loading on the listview but that wasn't the idea
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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