views:

8

answers:

0

I have a DataGridView that is bound to BindingSource and it's DataSource is DataView and this DataView has a DataTable bound.

But when I call

DataGridView.Sort(Column, Ascending)

On a column that exists in DGV and in DT I get error:

DataGridView control cannot be sorted if it is bound to an IBindingList that
does not support sorting.

And what is interesting BindingSource is implementing IBindingList propertly!

Moreover I've seen that this error can occur when:

DataConnection.List is not IBindingList
DataConnection.List is null

Do you know what can cause this kind of error? Any tips will help.

I can not provide snippet of code because It's a part of bigger solution and cannot isolate this error.