Home Forums WPF controls Xceed DataGrid for WPF Exception…

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #23629 |

    Hi everybody,
    when trying to drag a column header i get the exception:

    System.NullReferenceException was unhandled
    Message=”Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.”
    bei Xceed.Wpf.Utils.DragDrop.DragSourceManager.BeginDrag()
    bei Xceed.Wpf.Utils.DragDrop.DragSourceManager.ProcessMouseMove(MouseEventArgs e)
    bei Xceed.Wpf.DataGrid.ColumnManagerCell.OnMouseMove(MouseEventArgs e)
    bei System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
    bei System.Windows.Input.MouseEventArgs.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.Threading.Dispatcher.Run()
    bei System.Windows.Application.RunInternal(Window window)
    bei System.Windows.Application.Run(Window window)
    bei System.Windows.Application.Run()
    bei CMspEdit.CMspEditApp.Main() in C:\Users\Michael.DEVELOP\Documents\Visual Studio 2005\Projects\CMspEdit\CMspEdit\obj\Debug\CMspEditApp.g.cs:Zeile 0.
    bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
    bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    bei System.Threading.ThreadHelper.ThreadStart()

    any ideas?

    Imported from legacy forums. Posted by Michael (had 3026 views)

    Xceed Support
    Post count: 5658

    Just to help us debug… have you modified any Style and/or ControlTemplate (e.g. The DataGridControl’s ControlTemplate).

    If the answer is yes, can you provide us the modified styles and Templates

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

    User (Old forums)
    Post count: 23064

    It appears that there are no AdornerLayer above the DataGridControl. The drag & drop functionality needs it to draw its DropMarkPen and dragged ColumnManagerCell “ghost”. However, the control should not throw this exception and this has been fixed in the 1.2 code (not released yet).

    Meanwhile, as a workaround, you could try adding an AdornerDecorator somewhere in your XAML. It can be as high as your root Page or Window or as low as just above the DataGridControl. For instance:

    <xcdg:DataGridControl ItemsSource=…/>

    Hope this helps,

    Imported from legacy forums. Posted by Pascal (had 499 views)

    User (Old forums)
    Post count: 23064

    Thanks, Pascal! It helped me a lot. Would you update your documentation for this? It took me week to find out what the issue is. But anyway, thanks a lot. Lena

    Imported from legacy forums. Posted by Lena (had 3895 views)

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