Home Forums WPF controls Xceed DataGrid for WPF Xceed Grid: Program is crashing during selection of the rows with checkbox

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • karan@shaural.com
    Participant
    Post count: 2
    #44431 |

    Hello,

    I am using the Xceed grid and performing the below steps:
    1) open Screen with xceed grid having rows.
    2) Now Selecting 10-15 records by selecting checkbox and shift key and pressing select button which will show only selected records .
    3) Now Clicked on On Any First Row.
    4) Now Pressed Shift+Ctrl and Selected Last Row and then UnChecked the CheckBox of last row.

    While unchecking the checkbox of last row, I am getting the below exception.

    System.ArgumentOutOfRangeException was unhandled
    HResult=-2146233086
    Message=The current position must be greater than -1 and less than Count.
    Parameter name: newCurrentPosition
    Source=Xceed.Wpf.DataGrid.v6.0
    ParamName=newCurrentPosition
    StackTrace:
    at Xceed.Wpf.DataGrid.DataGridCollectionView.SetCurrentItem(Int32 newCurrentPosition, Boolean isCancelable)
    at Xceed.Wpf.DataGrid.DataGridCollectionView.MoveCurrentToPosition(Int32 position)
    at System.Windows.Controls.ItemCollection.MoveCurrentToPosition(Int32 position)
    at Xceed.Wpf.DataGrid.CurrencyManager.ChangeCollectionViewCurrentItem()
    at Xceed.Wpf.DataGrid.CurrencyManager.OnDataGridContextCurrentItemChanged(Object sender, EventArgs e)
    at Xceed.Wpf.DataGrid.CurrencyManager.OnReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
    at Xceed.Wpf.DataGrid.CurrencyManager.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
    at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType)
    at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Object sender, EventArgs args, Type managerType)
    at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
    at Xceed.Wpf.DataGrid.CurrentItemChangedEventManager.OnEventRaised(Object sender, EventArgs e)
    at Xceed.Wpf.DataGrid.DataGridContext.OnCurrentItemChanged()
    at Xceed.Wpf.DataGrid.DataGridContext.SetCurrentItem(Object dataItem, Int32 sourceDataItemIndex)
    at Xceed.Wpf.DataGrid.DataGridContext.SetCurrent(Object item, Row containerRow, Nullable`1 sourceDataItemIndex, ColumnBase column, Boolean forceFocus, Boolean isCancelable, Boolean synchronizeSelectionWithCurrent, AutoScrollCurrentItemSourceTriggers trigger)
    at Xceed.Wpf.DataGrid.Cell.BeginEdit()
    at Xceed.Wpf.DataGrid.DataGridControl.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
    at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e)
    at System.Windows.Input.KeyboardFocusChangedEventArgs.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(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(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.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
    at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
    at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
    at System.Windows.UIElement.Focus()
    at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown(MouseButtonEventArgs e)
    at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
    at System.Windows.UIElement.OnMouseDownThunk(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(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(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, WindowMessage 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, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    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.Threading.Dispatcher.Run()
    at System.Windows.Application.RunDispatcher(Object ignore)
    at System.Windows.Application.RunInternal(Window window)
    at System.Windows.Application.Run(Window window)
    at System.Windows.Application.Run()
    at testprogram.App.Main() in c:\testprogram \obj\Debug\App.g.cs:line 0
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Karan,

    If you use the latest version (v6.1), is the issue still present?

    Download Link: http://forums.xceed.com/latest-xceed-datagrid-for-wpf

    If it is, please send us a small stand-alone test project that reproduces the issue. It will help us in our investigation. You can send it by email at support@xceed.com

    Thank you.

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