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
40
UltraListView Custom Sort issue
posted

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