Unfortunately the code is 28 forms and very long. Here is the sub that is called when I click on the column header
Expand|Select|Wrap|Line Numbers
- 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