I am having a problem sorting my DataGridView in descending order. Everything works fine when sorting by ascending order using:
OrderTable.Rows.Add(objDR);
OrderTable.AcceptChanges();
dataGridView.DataSource = OrderTable;
dataGridView.Sort(dataGridView.Columns["ID"],ListSortDirection.Ascending)
but when I change the ListSortDirection to ListSortDirection.Descending, the dataGridView seems to add an uncommitted empty row at the end of the gridview. The underlying datasource has the correct # of records, but not the gridview.
Any ideas?
Thanks
Chris Taylor
OrderTable.Rows.Add(objDR);
OrderTable.AcceptChanges();
dataGridView.DataSource = OrderTable;
dataGridView.Sort(dataGridView.Columns["ID"],ListSortDirection.Ascending)
but when I change the ListSortDirection to ListSortDirection.Descending, the dataGridView seems to add an uncommitted empty row at the end of the gridview. The underlying datasource has the correct # of records, but not the gridview.
Any ideas?
Thanks
Chris Taylor