Looking for some assistance with an issue I'm seeing using a custom sort comparer on an UltraListView.
Using 2011 Vol 1 (11.1.20111.1003)
If I add a custom sort comparer to the MainColumn it works as expected and sorts correctly. When I click the column header to reverse the sort all items in the list view disappear. I verified that without the custom sort comparer the items remain.
The following exception is thrown but handled and never bubbles up to the user.
System.IndexOutOfRangeException occurred Message=Index was outside the bounds of the array. Source=mscorlib StackTrace: at System.Array.SorterObjectArray.QuickSort(Int32 left, Int32 right)
mscorlib.dll!System.Array.SorterObjectArray.QuickSort(int left, int right) + 0xb4 bytes mscorlib.dll!System.Array.SorterObjectArray.QuickSort(int left, int right) + 0x235 bytes mscorlib.dll!System.Array.Sort(System.Array keys, System.Array items, int index, int length, System.Collections.IComparer comparer) + 0x113 bytes mscorlib.dll!System.Collections.ArrayList.Sort(int index, int count, System.Collections.IComparer comparer) + 0x38 bytes mscorlib.dll!System.Collections.ArrayList.Sort(System.Collections.IComparer comparer) + 0x21 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.UltraListViewItemsCollection.VerifySort() + 0xab bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.UltraListViewItemsCollection.Count.get() + 0x36 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.VisibleItemsCollection.PopulateList() + 0x229 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.VisibleItemsCollection.VerifyCollection() + 0xc2 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.UltraListView.VisibleItems.get() + 0x78 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.ControlMetrics.ItemContainerSize.get() + 0x878 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.ControlMetrics.GetScrollbarVisibilityList(out bool needsHorizontal, out bool needsVertical) + 0x95 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.ControlMetrics.NeedsScrollbarHorizontal.get() + 0x140 bytes Infragistics2.Win.UltraWinListView.v11.1.dll!Infragistics.Win.UltraWinListView.UltraListViewUIElement.PositionChildElements() + 0x11c bytes
Thanks for the feedback Rob. Please if you have any questions, do not hesiate to write us.
Regards
That sample is exactly what I was doing. I can't explain it yet but this morning when I went to verify the behavior again it was working correctly. The only explanation would be either a threading issue somewhere or a resource leak was causing it.
I appreciate your time and effort to look into this. If it comes up again I'll be sure to follow up with you.
Thanks
Rob
Hello RobFord,
I try to reproduce your scenario in a small sample. Could you please take a look at the attached sample where I used SortComparer of MainColumn. Please let me know if you think that I didn`t reproduce your scenario or if you have any questions.