I ran into a problem using a DataGridView binding to an iBindingListView implementation (third-party dll) attached to a large collection.
My collection type has a specific property called MyDateTime , which is a value class similar to DateTime, but also with some legacy code.
This structure implements iComparable , iComparable<T> and iEquatable<T> .
I have a problem:
When I apply sorting to an iBindingListView on MyDateTimeColumn , it ALWAYS uses a non-generic iComparer , causing hundreds of thousands of unnecessary boxes and unpacking.
When I use the automatic sorting provided by DGV, it sorts the row in the column. Saving this column “automatically” instead of programmatically for that column alone would be unacceptable.
When I delete non-generic iComparer, the shared file is still not used, it just compares the string with .ToString ().
Am I missing something? Why is my generic non bieng counterpart causing sorting?
source share