Hi Brain,
You may take a look at the ListView.Sort method and also
ListView.ListItemSorter
property. You can use your own sorter by implementing the IComparer
interface.
Here is some links which maybe helpful to you,
<Documentation:ListView.ListItemSorter property>
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsLi
stViewClassListViewItemSorterTopic.asp?frame=true
<Technical Artical: Sorting ListView Items by Column Using Windows Forms>
http://msdn.microsoft.com/library/en-us/dnwinforms/html/listviewsort.asp?fra
me=true
Please be free to post your questions on our NG, if you meet problems in
implementing it.
Thanks!
Best regards,
Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
You should not reply this mail directly, "Online" shouldbe removed before
sending, Thanks!
--------------------
| From: "Brian Reed" <
[email protected]>
| Subject: Advice on how to Perform a multi-column sort in a list view
| Date: Tue, 16 Sep 2003 13:46:33 -0700
| Lines: 6
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#
[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| NNTP-Posting-Host: 66.166.27.66
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.windowsforms:52372
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| I have a dialog that the user needs to be able to sort by one column and
| then sort the sub groups from the first sort by a different column. I
have
| a dialog that allows them to pick the sort order and now I need to
implement
| it. Any advice on the easiest way to move rows in a list box?
|
|
|