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:
I was not able to reproduce this issue. I am testing this against the latest service release for 9.2 under Windows 7. Can you please give us more details on your environment
HI Alex,
We are currently experiencing the this exact same NullReferenceExeception (with the same stack trace), similar to the original post, I can't provide any further information because on most of our machines everything works fine, but on a small handful (about 3) we are consistently receiving this exception in several places.
I haven't been able to isolate any environmental differences that can explain this, and hence cannot provide any tips on how to reproduce this. Access to the .pdb files could help me troubleshoot this further.
Any help or information regarding this would be greatly appreciated.
Regards,
Liam