Home Forums WPF controls Xceed DataGrid for WPF ArgumentOutOfRangeException in CancelEdit()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25044 |

    Hi,

    I have build an dialog with a grid on it. When the user is inserting a new row and leaves the dialog (without commiting the new record) I cancel the on going editing with the following code:

    if (grid.IsBeingEdited)
    {
    grid.CancelEdit();
    }

    In CancelEdit I get the exception (see below). This didn’t occur when the user edit an existing Record. Anyone have an idea why this happens?

    regards

    Sörnt

    System.ArgumentOutOfRangeException wurde nicht von Benutzercode behandelt.
    Message=”Der Index lag außerhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.\r\nParametername: index”
    Source=”mscorlib”
    ParamName=”index”
    StackTrace:
    bei System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
    bei System.ThrowHelper.ThrowArgumentOutOfRangeException()
    bei Xceed.Wpf.DataGrid.DataGridCollectionView.RemoveSourceItem(Int32 startIndex, Int32 count)
    bei Xceed.Wpf.DataGrid.DataGridCollectionView.ProcessDeferredOperations(List`1 deferredOperations, Boolean processAll)
    bei Xceed.Wpf.DataGrid.DataGridCollectionView.ProcessDeferredOperations(Object processAll)
    bei Xceed.Wpf.DataGrid.DataGridCollectionView.DeferRefreshHelper.Dispose()
    bei System.Windows.Controls.ItemCollection.EndDefer()
    bei System.Windows.Controls.ItemCollection.DeferHelper.Dispose()
    bei Xceed.Wpf.DataGrid.DataRow.CancelEdit()
    bei Xceed.Wpf.DataGrid.InsertionRow.CancelEdit()
    bei Xceed.Wpf.DataGrid.DataGridControl.CancelEdit()
    bei MyVideos.frmDirectorSearch.onOK(Object sender, RoutedEventArgs e) in D:\VS2005\Projekte\MyVideos\MyVideos\frmDirectorSearch.xaml.cs:Zeile 74.
    bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    bei System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
    bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
    bei System.Windows.Controls.Button.OnClick()
    bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
    bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
    bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    bei System.Windows.UIElement.ReRaiseEventAs(RoutedEventArgs args, RoutedEvent newEvent)
    bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
    bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    bei System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
    bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    bei System.Windows.Input.InputManager.ProcessStagingArea()
    bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
    bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    bei System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
    bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    bei System.Windows.Window.ShowHelper(Object booleanBox)
    bei System.Windows.Window.Show()
    bei System.Windows.Window.ShowDialog()

    Imported from legacy forums. Posted by Sörnt (had 714 views)

    User (Old forums)
    Member
    Post count: 23064

    I need some help for this Problem, please – I can’t figure it out.

    Any help or hint is very welcome.

    Sörnt

    Imported from legacy forums. Posted by Sörnt (had 572 views)

    Xceed Support
    Member
    Post count: 5658

    We are not able to reproduce this issue internally…

    What version of the product are you using? Also, could you provide an application that reproduces the issue?

    You can send the reproduction application to support@xceedsoft.com with the reference “case 110314”.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 3270 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.