Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
OBservableCollection launch a null exception.
posted

Hello,

 

I am using the project attached on this page : http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

 

And when replacing the listView by your XamDataGrid I have a null referenceexception... Why ?

More ove, when the list is empty, it displays well the column names...

 

System.NullReferenceException was unhandled
  Message="La référence d'objet n'est pas définie à une instance d'un objet."
  Source="Infragistics3.Wpf.DataPresenter.v9.2"
  StackTrace:
       à Infragistics.Windows.Automation.Peers.DataPresenter.ViewableRecordCollectionAutomationPeer.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       à Infragistics.Windows.DataPresenter.ViewableRecordCollection.RaiseCollectionChanged(NotifyCollectionChangedEventArgs args)
       à Infragistics.Windows.DataPresenter.ViewableRecordCollection.RaiseChangeEvents(NotifyCollectionChangedEventArgs args)
       à Infragistics.Windows.DataPresenter.RecordManager.BeginUpdateInformation.ProcessPendingNotifications()
       à Infragistics.Windows.DataPresenter.ViewableRecordCollection.EnsureFiltersEvaluated()
       à Infragistics.Windows.DataPresenter.ViewableRecordCollection.Verify()
       à Infragistics.Windows.DataPresenter.ViewableRecordCollection.get_Count()
       à Infragistics.Windows.Automation.Peers.DataPresenter.ListAutomationPeerHelper..ctor(IRecordListAutomationPeer recordListAutomationPeer, IListAutomationPeer listAutomationPeer)
       à Infragistics.Windows.Automation.Peers.DataPresenter.ViewableRecordCollectionAutomationPeer..ctor(RecordListControl recordListControl, ViewableRecordCollection viewableRecordCollection, Boolean isRootLevel)
       à Infragistics.Windows.DataPresenter.RecordListControl.OnCreateAutomationPeer()
       à System.Windows.UIElement.CreateAutomationPeer()
       à System.Windows.Automation.Peers.UIElementAutomationPeer.iterate(DependencyObject parent, IteratorCallback callback)
       à System.Windows.Automation.Peers.UIElementAutomationPeer.iterate(DependencyObject parent, IteratorCallback callback)
       à System.Windows.Automation.Peers.UIElementAutomationPeer.iterate(DependencyObject parent, IteratorCallback callback)
       à System.Windows.Automation.Peers.UIElementAutomationPeer.iterate(DependencyObject parent, IteratorCallback callback)
       à System.Windows.Automation.Peers.UIElementAutomationPeer.GetChildrenCore()
       à System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       à System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       à System.Windows.ContextLayoutManager.fireAutomationEvents()
       à System.Windows.ContextLayoutManager.UpdateLayout()
       à System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       à System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       à System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       à System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       à System.Windows.Threading.DispatcherOperation.InvokeImpl()
       à System.Threading.ExecutionContext.runTryCode(Object userData)
       à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Windows.Threading.DispatcherOperation.Invoke()
       à System.Windows.Threading.Dispatcher.ProcessQueue()
       à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       à System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       à System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
       à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       à System.Windows.Application.RunInternal(Window window)
       à DemoApp.App.Main() dans D:\Dev\External\MvvmDemoApp\MvvmDemoApp\DemoApp\obj\Release\App.g.cs:ligne 0
       à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()
  InnerException: