I have searched my ass off for the answer of my problem. I have developed a c# Winforms program with a few datagridviews.
The problem is that I want to be the user able to sort the datagridview by clicking on the columnheader (i thought this would be standard...) But it is just not working.
I tried the dgv.Sort-method but this throws an exception that the datagridview has to be bound to an IBindingList but I have no clue how to do that and I really do not want to redevelope everything..
Here's how I populate my dgv.
I have certain custom objects and put them into a list. When this list is fullypopulated I set it as the datasource for the dgv.
list.Add(costumobject);
.
.
.
dgv.DataSource = list;
Could you please tell me a quick way to make the sort-function working?
Kind regards,