Hello,
i encounter this error on some workstations. Can you tell me if there are a know issue about this error?
In my code behind, i instantiate a simple xamdatagrid which i add a fieldlayout with this line:
XamDataGrid1.FieldLayouts.Add(myLayout)
Here is the stack trace: Infragistics.Windows.DataPresenter.DataPresenterBase.set_DefaultFieldLayout(FieldLayout value) at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value) at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue) at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange) at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange) at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange) at MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject d, DependencyProperty dp, Boolean isASubPropertyChange) at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args) at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args) at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args) at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
The datasource of the xamdatagrid is databind to an obsevableCollection.
This error appear on 3 client workstations. In my developer team, this error not appear...
Help will be appreciated.
Hello Pierre,
What version of the Infragistics product are you using? I'm looking at the 14.1 source code for OnPropertyChanged in DataPresenterBase and I don't see a line of code that sets the DefaultFieldLayout as it suggests in the stack trace. I also don't think that line of code you provided is the cause of the issue since it does not appear in the stack trace. The error itself is pretty self-explanatory. Something is trying to set the DefaultFieldLayout property to a FieldLayout that does not exist in the FieldLayouts collection. In order to try and track this down, I'll need to know the exact version of the Infragistics assemblies you are using.
Hello Rob,
I use the version 12.2 of IG: InfragisticsWPF4.DataPresenter.v12.2, Version=12.2.20122.1000
thanks.
Hello Valerie,
The datasource of the XamDataGrid is binding to a property (ObservableCollection<UserObject>). When the view is loaded (on loaded event), i create a list of fieldlayout (List<FieldLayout> => layouts) and i make this:
foreach (var layout in layouts) grid.FieldLayouts.Add(layout);
The problem is that this problem is occured on some workstations in my company (3/30 computers).
On my computer and for all computer of my developpement team, this error does not fire.
Thx for your help.
Hi Pierre,
Is there anything special about those 3 workstations compared to the others?
The version of Infragistics you are using is the base version of 12.2 which is very old. There have been numerous service releases since then so it's possible that one of them has already addressed this. Though I checked the bug history and didn't see anything that looked similar to this. This is the latest version available for 12.2. http://download.infragistics.com/products/NetAdvantage/WPF/2012.2/SR/NetAdvantage_WPF_20122.2292_SR.zip
As for the call stack, I took a look at DataPresenterBase.OnPropertyChanged and I don't see any lines of code that set the DefaultFieldLayout property, so I'm not sure why the stack trace looks like that. It would be nice to know what the user was doing when this error occurred. Was it during loading or was the user doing something in the application that then triggered this?
Do you still require assistance on this issue?
End of July, we build and publish a new version of our program and it seems that the problem is resolved.
Thk for your help.
Pierre.
That's great! I'm glad it's working now.