Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

ArgumentOutOfRangeException when sorting a DataGridView using a custom IComparer

if (row1.ReadOnly == row2.ReadOnly)  // change && to ==
    {
        return 0;
    }
    else if (row1.ReadOnly && !row2.ReadOnly)
    {
        return 1;
    }
    else
    {
        return -1;
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ArgumentOutOfRangeException #sorting #DataGridView #custom #IComparer
ADD COMMENT
Topic
Name
5+2 =