Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
XamGrid Sorting Issue
posted

Hello,

I noticed when trying to sort a XamGrid that has 16 or more items of the same value in the column to be sorted, a IComparer.Compare() exception is generated:

System.ArgumentException was unhandled
Message: An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'Infragistics.MultiSortComparer`1[XamGridSortingIssue.GridData]'.

I have an example project, but i can only add files less than 1024KB and the infragistics reference dlls are larger than that.  My project is simply creating a XamGrid, simple class with 1 DateTime member, and then adding 17 instances of the same exact datetime to the binding list that is the itemsource of the xamgrid.  Once built and the form is shown, I create the error by clicking on the column header.

How can I get around and/or fix this issue?


Thanks

Parents
  • 29065
    Verified Answer
    Offline posted

    Hello Gary, 

    Thank you for contacting Infragistics. An ArgumentException regarding the ICompare.Compare() method aftersorting was recently fixed, and currently awaiting release. The behavior can be seen in the sample below. Let me know if the issue differs in anyway. In addition, I linked this case to development item 247673 and created a private support ticket (CAS-197814-B0D5Q8) so you are notified when the fix has been released. 

    WpfApplication1version2017 (1).zip

Reply Children
No Data