We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Bugs in GridControl.CurrentCellActivating event arguments

Thread ID:

Created:

Updated:

Platform:

Replies:

76464 Sep 8,2008 03:22 PM Sep 9,2008 06:04 AM WPF 2
loading
Tags: GridControl
Mike Miller
Asked On September 8, 2008 03:22 PM

Setting e.ActivateOptions.ShouldBeginEdit = false doesn't stop the cell from going into edit mode when clicked.

Setting e.Cancel = true results in the following null reference exception:

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Syncfusion.Grid.Wpf"
StackTrace:
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(RowColumnIndex cellRowColumnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCellRendererBase.MoveCurrentHelper(FrameworkElement owner, MouseControllerEventArgs e)
at Syncfusion.Windows.Controls.Grid.GridCellRendererBase.MouseDown(FrameworkElement owner, MouseControllerEventArgs e)
at Syncfusion.Windows.Controls.Scroll.MouseControllerDispatcher.MouseDown(MouseButtonEventArgs e, Boolean isPreview)
at Syncfusion.Windows.Controls.Scroll.MouseControllerDispatcher.OnPreviewMouseDown(MouseButtonEventArgs e)
at Syncfusion.Windows.Controls.Scroll.MouseEventTargetCollection.OnPreviewMouseDown(MouseButtonEventArgs e)
at Syncfusion.Windows.Controls.Scroll.ScrollControl.OnPreviewMouseDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnPreviewMouseDownThunk(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.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.WrappedInvoke(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.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 SyncFusionTest.App.Main() in c:\Source\SyncFusionTest\SyncFusionTest\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:



Mike Miller
Replied On September 8, 2008 03:23 PM

Sorry - forgot to mention the version is: 6.303.1.8

>Setting e.ActivateOptions.ShouldBeginEdit = false doesn't stop the cell from going into edit mode when clicked.

Setting e.Cancel = true results in the following null reference exception:

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Syncfusion.Grid.Wpf"
StackTrace:
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(RowColumnIndex cellRowColumnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
at Syncfusion.Windows.Controls.Grid.GridCellRendererBase.MoveCurrentHelper(FrameworkElement owner, MouseControllerEventArgs e)
at Syncfusion.Windows.Controls.Grid.GridCellRendererBase.MouseDown(FrameworkElement owner, MouseControllerEventArgs e)
at Syncfusion.Windows.Controls.Scroll.MouseControllerDispatcher.MouseDown(MouseButtonEventArgs e, Boolean isPreview)
at Syncfusion.Windows.Controls.Scroll.MouseControllerDispatcher.OnPreviewMouseDown(MouseButtonEventArgs e)
at Syncfusion.Windows.Controls.Scroll.MouseEventTargetCollection.OnPreviewMouseDown(MouseButtonEventArgs e)
at Syncfusion.Windows.Controls.Scroll.ScrollControl.OnPreviewMouseDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnPreviewMouseDownThunk(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.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.WrappedInvoke(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.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 SyncFusionTest.App.Main() in c:\Source\SyncFusionTest\SyncFusionTest\obj\Debug\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:





Administrator [Syncfusion]
Replied On September 9, 2008 06:04 AM

This is a defect that we will correct. Until there is a version with this corrected, maybe code like this will serve your needs:

void grid_CurrentCellStartEditing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
grid.UnloadArrangedCells();
grid.InvalidateVisual();
}



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;