Aug 5th, 2003, 05:44 PM
#1
Thread Starter
Frenzied Member
How can you sort a listview based on the column clicked? *resolved*
Last edited by VaxoP; Aug 5th, 2003 at 11:55 PM .
Aug 5th, 2003, 05:47 PM
#2
Are you talking about when someone highlights an object within the listview or something totally different?
A better explination of your program would help us in providing you help
Aug 5th, 2003, 05:50 PM
#3
Thread Starter
Frenzied Member
i have 5 columns in my listview
A B C D E
how can i sort the listview according the column clicked? if B was clicked, then sort the data according to values in B. if D was clicked, sort according to D.
any idea?
Aug 5th, 2003, 05:57 PM
#4
Check out the SelectedIndexChanged event
Aug 5th, 2003, 07:54 PM
#5
Thread Starter
Frenzied Member
but how can you sort according to the index?
i can only get it to sort to the first column..
Aug 5th, 2003, 08:14 PM
#6
Frenzied Member
You have to implement IComparable. Look in the help. There is an example there.
Aug 5th, 2003, 10:23 PM
#7
Thread Starter
Frenzied Member
i didnt install help (needed the hd space) and msdn.microsoft.com is down
argh why is it so hard to sort a listview?
Aug 5th, 2003, 10:30 PM
#8
Frenzied Member
Here is a project I did a while back. It should help you with what you need to do.
Attached Files
Aug 5th, 2003, 11:54 PM
#9
Thread Starter
Frenzied Member
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