I have a DataGridView in a Winforms application. I want to select a set of rows in it and sort those rows by a column (Timestamp)...
The rest of the rows should rema
Definitely, the DataGridView cannot do this. So, the best solution would be to create a new collection (List), populate it with selected rows from the GridView and finally use its Sort method to order these rows. To sort data by a certain column, you can either write a custom IComparer class and pass it to the Sort method or use Linq:
var orderedList = someList.OrderBy(obj => obj.TimeStampField);