I am programmatically adding columns to a DataGridView and then binding to a list. By default, the SortMode of the columns are Automatic. But when I run my app, clicking o
We use BindingListView to bind List
Here is a very simple example of creating a view of a list of objects (in C#):
List customers = GetCustomers();
BindingListView view = new BindingListView(customers);
dataGridView1.DataSource = view;
Check out https://stackoverflow.com/a/17952576/116891 for a lot more details about DGV sorting and databinding.
If you don't want to add something that heavy, you can try this implementation of a SortableBindingList
Both give you sorting right out of the box, and BindingListView is even faster than DataViews, according to their benchmarks.