ColumnSort OutofRangeException!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pedro007
    New Member
    • Nov 2009
    • 19

    ColumnSort OutofRangeException!

    hey,

    by a column Sort in a listview i become in the row :

    compareResult = ObjectCompare.C ompare(listview X.SubItems[ColumnToSort].Text,listviewY .SubItems[ColumnToSort].Text);

    ArgumnetofArran geException.

    I do not know where that is?!!
    someboby any idea?!

    regards
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    This may help....

    Link

    Regards
    Dheeraj Joshi

    Comment

    • pedro007
      New Member
      • Nov 2009
      • 19

      #3
      i have this listview in a tabcontrol ,and when i click in a column into listview it sort correctly but i clikc the Tab again the message show :

      ArgumnetofArran geException.(in valid Index)!

      how can i do ?!

      regards

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        If you are doing this on a selection change, you should be checking to make sure something is selected and that the index of the selected item isn't -1

        Comment

        Working...