Welcome to the Xceed Community Sign in | Join | Help
Community Search  

ArgumentOutOfRangeException on index field during sort of the grid

Sort Posts: Previous Next
  •  05-10-2008, 5:44 PM Post no. 12149

    ArgumentOutOfRangeException on index field during sort of the grid

    I have a readonly grid (version 2.0) that is bounded to a typed data set.

    When I add rows (programatically) and then click on the column header the gridis sorted without any problem.

    After I delete rows (programatically) and then click on a column header I get an exception AgrumentOutOfRange on the index field.

    This is the callstack that I got:

      at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at Xceed.Wpf.DataGrid.DataGridCollectionViewGroup.GetRawItemAtGlobalSortedIndex(Int32 index)
       at Xceed.Wpf.DataGrid.DataGridCollectionView.SaveCurrentBeforeReset(RawItem& oldCurrentRawItem, Int32& oldCurrentPosition)
       at Xceed.Wpf.DataGrid.DataGridCollectionView.SortItems(SortDescriptionInfo[] sortDescriptionInfos, Boolean sendResetNotification, Boolean triggerRootGroupChanged)
       at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferredOperationManager.Process(Boolean processAll)
       at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferredOperationManager.Process()
       at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferRefreshHelper.Dispose()
       at System.Windows.Controls.ItemCollection.EndDefer()
       at System.Windows.Controls.ItemCollection.DeferHelper.Dispose()
       at Xceed.Wpf.DataGrid.SortingHelper.ToggleColumnSort(DataGridContext dataGridContext, SortDescriptionCollection sortDescriptions, ColumnCollection columns, Column column, ModifierKeys modifiers, Boolean canSort)
       at Xceed.Wpf.DataGrid.ColumnManagerCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Window.Show()
       at System.Windows.Window.ShowDialog()

  •  05-12-2008, 8:10 AM Post no. 12162 in reply to 12149

    Re: ArgumentOutOfRangeException on index field during sort of the grid

    Can you send a repro application to support@xceedsoft.com?

    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  05-19-2008, 1:53 PM Post no. 12365 in reply to 12162

    Re: ArgumentOutOfRangeException on index field during sort of the grid

    Hi Jenny, 

    I have sent a sample application to the support last week.

    Is there any workaround for the problem?

     

    Thanks,

    Joy.

  •  05-19-2008, 2:07 PM Post no. 12368 in reply to 12365

    Re: ArgumentOutOfRangeException on index field during sort of the grid

    Hmmm.. I did not receive the repro. Can you send it directly to me by email (available in my profile).

    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.