I am using PostSharp and RadGridView from Telerik. Some columns have custom data using a DataTypeConverter, which I am using to load a value from a property named Name
of type AdvisableDictionary<Tkey, TValue>
.
The grid has the filter button and when clicked will show a popup window with Excel-like filtering options.
However when I click this button, I get an error saying Failed to compare two elements in the array.
This happens only for the columns with this type of data. I don't have much experience with PostSharp, but I think this is generated by PostSharp.
Here are the last lines from Output window from PostSharp, before it throws the exception:
The thread 0x3964 has exited with code 0 (0x0).
The thread 0x364 has exited with code 0 (0x0).
Step into: Stepping over non-user code 'TranslatableObject.get_Name'
Step into: Stepping over non-user code 'TranslatableObject.<Name>c__Binding1.GetValue'
Step into: Stepping over non-user code 'TranslatableObject.<Name>c__Binding1.get_LocationInfo'
Step into: Stepping over non-user code 'TranslatableObject.<Name>c__Binding.GetValue'
what can I do to resolve this error?
I figured out a solution: AdvisableDctionary
does not implement IComparable used to sort the list of items.
I created a class to inherit AdvisableDictionary
and implement IComparable
and in FilterConfirmed
event of the Filter Popup.
I corrected the value of the filter descriptor.