How to sort listview items 
Author Message
 How to sort listview items

Could someone give me a few hints on sorting listview items? So far I found:
listview1.Sorting = WinForms.SortOrder.Ascending

But that only works with the first column. How could I sort by another
column? And how could I add the sort direction arrows present in common
programs like OE?
Also, how would I sort items using non-text criteria (like numbers, dates)?

TIA,
Best Regards,

Miguel Santos



Fri, 30 May 2003 18:56:58 GMT  
 How to sort listview items
You have to create a class that implements IComparer and set the
ListItemSorter property of the ListView. I have a little (unfinished)
sample If you are interested.

Roberto


Quote:
> Could someone give me a few hints on sorting listview items? So far I
found:
> listview1.Sorting = WinForms.SortOrder.Ascending

> But that only works with the first column. How could I sort by another
> column? And how could I add the sort direction arrows present in common
> programs like OE?
> Also, how would I sort items using non-text criteria (like numbers,
dates)?

> TIA,
> Best Regards,

> Miguel Santos



Fri, 30 May 2003 22:26:38 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to sort listview items by colHeader clicked as in Explorer

2. Get items from Listview sorted with API:s in sorted order

3. Add items after sorting a Listview

4. ListView Item Index after manual sort

5. Sorting ListView items & Setting ForeColor

6. Adding items to a Listview while Sorting is active

7. Sorting Listview on certain items

8. Sorting Listview on certain items

9. Sorting Listview on certain items

10. Can't sort Outlook Personal Folder using Items.Sort

11. Items.Sort NOT Sorting????

12. jump listview to the hilight item (selected item)...

 

 
Powered by phpBB® Forum Software