Multi-column Sorting in Listview

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Manjunath M V (man.hegde_at_gmail.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 21:06:33 +0530

Hi,
Is there any sample available for implementing multiple column sorting
in .net listview control? My requirements are as follows:
  1. When the user clicks on a column, the list view content should be
sorted based on this column. Now if he holds a Ctrl key and then presses
another column, a “subsorting” should happen in the already sorted
content based on this second column.
  2. If the user now clicks on any column without holding the Ctrl key,
sorting should happen only based on this field.
  3. Display an Up/Down arrow symbol in a column used for sorting. This
would visually indicate to the user about whether a column is sorted in
ascending / descending order.
  4. Clicking on a column already used for sorting should reverse the
order. In multi-column sorting mode, the user should use Ctrl key in
conjunction with column clicks for this purpose.
  5. The primary sort column should have a larger/darker arrow and the
secondary column should have a smaller/lighter arrow. The secondary
column arrow should not display if there is no secondary sort order.

Thanks in advance for any help!
Regards,
Manju



Relevant Pages

  • RE: Multi-column Sorting in Listview
    ... > content based on this second column. ... If the user now clicks on any column without holding the Ctrl key, ... > sorting should happen only based on this field. ... Display an Up/Down arrow symbol in a column used for sorting. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Maintaining cell reference after sorting
    ... highlight the range and click the arrow to the left of the sign in the ... > Is there a way to maintain a cell reference after sorting a table? ... > identify the row number of a specific cell after sorting. ...
    (microsoft.public.excel.misc)
  • Re: How to Delete a grouping section?
    ... cursor becomes a right arrow) at the left edge of the ... Sorting and Grouping window, ...
    (microsoft.public.access.reports)
  • A question about the TwwDBGrid component
    ... Attaching an image (an arrow) and sorting the DBGrid column at the click of ... the mouse is simple with the TwwDBGrid component from Infopower.I didn't ...
    (comp.lang.pascal.delphi.misc)
  • Re: I want the items in the A column in reverse order in the B column.
    ... Drag this down, with Ctrl key held down, as far as Column ... Sort both columns together, sorting on Column B, descending. ...
    (microsoft.public.excel.misc)