-
April 16th, 2012, 06:16 PM
#1
How to sort different columns of different type of listview in VB.Net?
Using Microsoft Visual Studio 2010 Ultimate - VB.Net
I'm writing an application where as many of other applications fulfill the requirements to be as an app , having it's statistics schema. Thus I made a form where I have a combox(of query category), a textbox(as searchfield), two datetimepickers(from and to) a listview and a button to fire the event with functions in it. I'm all set except for a minor issue I've encountered during my very first experiments with ListView control. Thus far I didn't know that VB users are stuck with that control's property options (whereas DataGridView has way too many), especially when it came to Column reordering/s. With the simple but not satisfying property Sort I couldn't find a proper solution to my issue.
So frankly I'm asking for help that when I click on of the columns in the listview to do a Number/Date/Text reordering (descending>ascending, via-verse). Not to forget to mention there a limited number of columns most likely 2-4 max.
The listview control has lvResults name and has for now columns inserted as "Country" and the other for subitems "Total Spent".
One e.g. of the values inserted to it is like this :
Country Total Spent
Germany 129.02
England 68.58
Sweden 88.80
Albania 15.75
Turkey 38.22
Kosova 100.50
If pressed on Total Spent, should reorder from highest to the lowest number and via-versa.
If pressed on Country should reorder from A to Z or via-versa.
-
April 17th, 2012, 12:18 AM
#2
Re: How to sort different columns of different type of listview in VB.Net?
Why not use a DB GridView?
-
April 17th, 2012, 01:39 AM
#3
Re: How to sort different columns of different type of listview in VB.Net?
That's something I've already mastered in case I cannot find the solution I'll switch to DB grid view.
But I intend to learn listview because I'm doing with several values , a short list of it.
Still looking forward to see if anyone could help me through.
Regards.
-
April 17th, 2012, 06:56 AM
#4
Re: How to sort different columns of different type of listview in VB.Net?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|