Getting very strange behaviour from xamDataGrid. Scrolling and filtering is incorrectly changing properties in the underlying datasource and consequently corrupting the datasource. Is this a known issue?
Adding a breakpoint when a property changes reveals the following stack trace:
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.SetValue(object item, object value) Unknown PresentationFramework.dll!System.Windows.Data.BindingExpression.UpdateSource(object value) Unknown PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.UpdateValue() Unknown PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.Dirty() Unknown PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.SetValue(System.Windows.DependencyObject d, System.Windows.DependencyProperty dp, object value) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetCurrentValue(System.Windows.DependencyProperty dp, object value) Unknown InfragisticsWPF4.v13.1.dll!Infragistics.DependencyPropertyUtilities.SetCurrentValue(System.Windows.DependencyObject d, System.Windows.DependencyProperty property, object newValue) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.XamComboEditor.Sync_SetValueHelper(System.Windows.DependencyProperty prop, object value, Infragistics.Windows.Editors.XamComboEditor.ValueChangeSource changeSource) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.XamComboEditor.OnValueChanged_SyncPropertiesHelper(Infragistics.Windows.Editors.XamComboEditor.ValueChangeSource source, object value) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.XamComboEditor.OnValueChanged_SyncProperties(Infragistics.Windows.Editors.XamComboEditor.ValueChangeSource source, object value, bool calledFromSyncValuePropertiesOverride) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.XamComboEditor.SyncValuePropertiesOverride(System.Windows.DependencyProperty prop, object newValue, out System.Exception error) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.ValueEditor.SyncValueProperties(System.Windows.DependencyProperty prop, object newValue) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.ValueEditor.OnValueChanged(System.Windows.DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.ValueEditor.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.TextEditorBase.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.XamComboEditor.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) Unknown InfragisticsWPF4.Editors.v13.1.dll!Infragistics.Windows.Editors.ValueEditor.Value.set(object value) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.CellValuePresenter.InitializeCellLevelSettings(Infragistics.Windows.DataPresenter.DataRecord newRecord, Infragistics.Windows.DataPresenter.DataRecord oldRecord, Infragistics.Windows.DataPresenter.Field newField, Infragistics.Windows.DataPresenter.Field oldField, bool isWithinRecord) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.CellValuePresenter.InitializeRecord(Infragistics.Windows.DataPresenter.DataRecord newRecord, Infragistics.Windows.DataPresenter.DataRecord oldRecord) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.CellValuePresenter.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown PresentationFramework.dll!System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(System.Windows.DependencyObject d, System.Windows.InheritablePropertyChangeInfo info, bool visitedViaVisualTree) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>._VisitNode(System.Windows.DependencyObject d, bool visitedViaVisualTree) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.WalkLogicalChildren(System.Windows.FrameworkElement feParent, System.Windows.FrameworkContentElement fceParent, System.Collections.IEnumerator logicalChildren) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement feParent, bool hasLogicalChildren) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.IterateChildren(System.Windows.DependencyObject d) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>._VisitNode(System.Windows.DependencyObject d, bool visitedViaVisualTree) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.WalkLogicalChildren(System.Windows.FrameworkElement feParent, System.Windows.FrameworkContentElement fceParent, System.Collections.IEnumerator logicalChildren) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement feParent, bool hasLogicalChildren) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.IterateChildren(System.Windows.DependencyObject d) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>._VisitNode(System.Windows.DependencyObject d, bool visitedViaVisualTree) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement feParent, bool hasLogicalChildren) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.IterateChildren(System.Windows.DependencyObject d) Unknown PresentationFramework.dll!System.Windows.DescendentsWalker<System.Windows.InheritablePropertyChangeInfo>.StartWalk(System.Windows.DependencyObject startNode, bool skipStartNode) Unknown PresentationFramework.dll!System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(System.Windows.FrameworkElement fe, System.Windows.FrameworkContentElement fce, System.Windows.InheritablePropertyChangeInfo info, bool skipStartNode) Unknown PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) Unknown PresentationFramework.dll!System.Windows.Controls.ContentPresenter.OnContentChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown WindowsBase.dll!System.Windows.DependencyObject.InvalidateProperty(System.Windows.DependencyProperty dp, bool preserveCurrentValue) Unknown PresentationFramework.dll!System.Windows.StyleHelper.InvalidateDependents(System.Windows.Style ownerStyle, System.Windows.FrameworkTemplate frameworkTemplate, System.Windows.DependencyObject container, System.Windows.DependencyProperty dp, ref MS.Utility.FrugalStructList<System.Windows.ChildPropertyDependent> dependents, bool invalidateOnlyContainer) Unknown PresentationFramework.dll!System.Windows.StyleHelper.OnTriggerSourcePropertyInvalidated(System.Windows.Style ownerStyle, System.Windows.FrameworkTemplate frameworkTemplate, System.Windows.DependencyObject container, System.Windows.DependencyProperty dp, System.Windows.DependencyPropertyChangedEventArgs changedArgs, bool invalidateOnlyContainer, ref MS.Utility.FrugalStructList<MS.Utility.ItemStructMap<System.Windows.TriggerSourceRecord>> triggerSourceRecordFromChildIndex, ref MS.Utility.FrugalMap propertyTriggersWithActions, int sourceChildIndex) Unknown PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.RecordPresenter.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.DataRecordPresenter.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) Unknown WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) Unknown InfragisticsWPF4.v13.1.dll!Infragistics.Windows.Virtualization.RecyclingItemContainerGenerator.ConnectContainerToItem(Infragistics.Windows.Virtualization.RecyclingItemContainerGenerator.ContainerReference cr) Unknown InfragisticsWPF4.v13.1.dll!Infragistics.Windows.Virtualization.RecyclingItemContainerGenerator.RecyclingGenerator.GenerateNext(bool returnNullIfAlreadyRealized, out bool isNewlyRealized) Unknown InfragisticsWPF4.v13.1.dll!Infragistics.Windows.Virtualization.RecyclingItemContainerGenerator.GenerateNext(out bool isNewlyRealized) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateNextElement(bool isHeader) Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateScrollableRecords() Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateAllRecords() Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridViewPanelFlat.MeasureOverride(System.Windows.Size availableSize) Unknown PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Unknown PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Unknown PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridUtilities.ProcessAsyncInvalidationsImpl() Unknown InfragisticsWPF4.DataPresenter.v13.1.dll!Infragistics.Windows.DataPresenter.GridUtilities.ProcessAsyncInvalidations() Unknown [Native to Managed Transition] mscorlib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown [Native to Managed Transition] [Managed to Native Transition] WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox) Unknown PresentationFramework.dll!System.Windows.Window.ShowDialog() Unknown
Hi,
I never did get a response from Infragistics.
In the end I was able to work around the issue by disabling the two way binding and instead adding a ValueChanged event handler to the required columns to check whether the NewValue should be propagated to the datasource and then update the datasource if required. It's an ugly hack but in the absence of a solution from Infragistics it does at least work.
We are too facing the similar issue's.
Columns value is getting changed while scrolling the xamdata grid
Try to resolve it by turning of the virtualization, but it slowed down the sorting(Filter) operation
Please let me know is there any update on it?
Furthermore, tried to put into scrollviewer but facing scrolling issue with it like:-
Scrolling with arrow keys wasn't working properly if i disable the internal scrollviewer of the record presenter of xam data grid and put it in the scrollviewer by setting the viewSetting to infinite
Moreover, for mouse scrolling to work properly i have to write an extra method in the code behind.
Your help will be greatly appreciated.
Is this still being investigated? Please can somebody respond with an update.
At present this is causing regular data corruptions of the underlying data source.
Is there any update on this?
Thanks for the response. I have tried what you suggested and placing the XamDataGrid inside a ScrollViewer component along with setting HeightInInfiniteContainers="Infinity" does appear to solve the scrolling issue. However, the issue is still present when filtering using the built-in filter controls. Furthermore, without the virtualization the grid is very slow and unresponsive.
Is there a way that the virtualization functionality can be maintained without triggering the issue we are having?