Hello,
I've got a problem. I created a DataGridView, where a DataTable is it's DataSource. There is a column named "Age" i this DataGridView. It's format is string as I accept the value "unknown". The problem occurs when i try to sort it. After descending sorting the rows where "Age" value is "unknown" are placed at the top of the table. I'd like them to stay at the bottom of the table, no matter if the sort mode is descending or ascending. I've tried to modify the sorting function, but it doesn't work. I tried to follow the pattern from msdn and created my own IComparer.
private class RowComparer : System.Collections.IComparer
{
...
}
dataGridView1.Sort(new RowComparer());
and here the debugger showed the following error:
"DataGridView control is data-bound. The control cannot use the comparer to perform the sort operation."
Please help me if you can
Bye