locked
pls help he with listview(multi column sorting) RRS feed

Answers

  • OK then this will be probably help you

    http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter.aspx

     


    The complexity resides in the simplicity
    Sunday, May 15, 2011 8:53 AM
  •   Col2

    1           C

    3           B

    2           B

    4           A

    ' User clicks Col1 then Col2

    ' Would get sorted as

     

    Col1      Col2

    4          A

    2          B

    3          B

    1          C

    thanks

    Wait now.... sorting is based on one column`s click not on both. So when user clicks on column 1 header, the listView is sorted by the 1st column (and rows go along). And when he clicks on 2nd column, the listView re-sorts by the 2nd column.

    It cannot be sorted by both columns at the same time, or at least there is no point in clicking on both columns to sort the listView.

    Am I right?


    Mitja
    Sunday, May 15, 2011 11:24 AM

All replies

  • Do you want to sort sorting of the columns (of all) in the listview? Or what does it mean "multiple"?

    Do you means letters from A to Z and number from 0 on?


    Mitja
    Friday, May 13, 2011 8:17 PM
  • Hi

    You  have to precise the platform first ASP.NET, WinForm or WPF

     


    The complexity resides in the simplicity
    Saturday, May 14, 2011 12:52 PM
  •  

    Sorry I wasnot being very clear before.for example if have col1,col2 in my listview

    Like below

     

    Col1      Col2

    1           C

    3           B

    2           B

    4           A

    ' User clicks Col1 then Col2

    ' Would get sorted as

     

    Col1      Col2

    4          A

    2          B

    3          B

    1          C

    thanks

    Saturday, May 14, 2011 7:05 PM
  • i am woking on winform application

    thanks

    Saturday, May 14, 2011 7:05 PM
  • OK then this will be probably help you

    http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter.aspx

     


    The complexity resides in the simplicity
    Sunday, May 15, 2011 8:53 AM
  • Hi,
    Try the link below, I will short multiple columns in listview control.
    http://www.vbforums.com/showthread.php?t=613860
    I hope this might be helpful to you..
    Thanks
    Md. Marufuzzaman
    Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
    I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
    Sunday, May 15, 2011 10:06 AM
  •   Col2

    1           C

    3           B

    2           B

    4           A

    ' User clicks Col1 then Col2

    ' Would get sorted as

     

    Col1      Col2

    4          A

    2          B

    3          B

    1          C

    thanks

    Wait now.... sorting is based on one column`s click not on both. So when user clicks on column 1 header, the listView is sorted by the 1st column (and rows go along). And when he clicks on 2nd column, the listView re-sorts by the 2nd column.

    It cannot be sorted by both columns at the same time, or at least there is no point in clicking on both columns to sort the listView.

    Am I right?


    Mitja
    Sunday, May 15, 2011 11:24 AM