Getting incomplete sorting in datagridview whether clicking on the grid column header or using a sort method on an unbound grid sorts imcompletely. On some cols it appears to sort all rows except the last, on others it changes row order but the selected column is all over the place! I would appreciate any help!
Unfortunately the code is 28 forms and very long. Here is the sub that is called when I click on the column header
I can send you 3 views that illustrate the problem but dont seem able to include them in this post.
Unfortunately the code is 28 forms and very long. Here is the sub that is called when I click on the column header
Code:
Public Sub SortGrid(ByVal sender As System.Object, ByVal rowindex As Integer, ByVal colindex As Integer)
Dim col As DataGridViewColumn
col = sender.Columns.Item(colindex)
col.SortMode = DataGridViewColumnSortMode.Programmatic
If rowindex = -1 Then sender.Sort(col, System.ComponentModel.ListSortDirection.Ascending)
End Sub