Hello,
i get an runtime error when putting the style below to fieldsettings.CellValuePresenterStyle.
The problem did not occur with v12.1
The problem occurs since we use 13.1.
Is this a known bug and is it solved in 14.1? (The latest version we owe)
<Style TargetType="igDP:CellValuePresenter"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igDP:CellValuePresenter"> <CheckBox HorizontalAlignment="Center" IsChecked="{Binding DataItem.Model.IstBearbeitbarProperty.Value}"/> </ControlTemplate> </Setter.Value> </Setter> </Style>
Exception:
System.ArgumentException: FieldSettings.CellValuePresenterStyle's TargetType setting can only be null or a type that derives from CellValuePresenter or is a base class of CellValuePresenter, CellValuePresenter is invalid.Parametername: FieldSettings.CellValuePresenterStyle bei Infragistics.Windows.Utilities.ValidateTargetTypeOfStyle(Style style, Type targetType, String propertyName) bei Infragistics.Windows.DataPresenter.FieldSettings.ValidateCellValuePresenterStyle(Object value) bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) bei Infragistics.Windows.DataPresenter.FieldSettings.set_CellValuePresenterStyle(Style value) bei Rehm.Utils.Gui.OrmUtilGui.CListGui.NewField(CColumn aColumn, List`1 aFieldSortDescriptions, Boolean aShowEmbeddedCellGuis1) in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 950. bei Rehm.Utils.Gui.OrmUtilGui.CListGui.NewField(CColumn aColumn, List`1 aFieldSortDescriptions) in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 761. bei Rehm.Utils.Gui.OrmUtilGui.CListGui.<>c__DisplayClass13.<RefreshListViewNow2>b__e(CColumn aPair) in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 1098. bei Rehm.Utils.Extensions.Util.Transform[TIn,TOut](IEnumerable`1 aIns, Func`2 aCreateOut) in i:\Prj\Git01\M\GWS2\Utils\Extensions.cs:Zeile 1156. bei Rehm.Utils.Gui.OrmUtilGui.CListGui.RefreshListViewNow2() in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 1095. bei Rehm.Utils.Gui.OrmUtilGui.CListGui.RefreshListViewNow() in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 1002. bei Rehm.Utils.Gui.OrmUtilGui.CListGui.<get_RefreshEntpreller>b__4() in i:\Prj\Git01\M\GWS2\UtilsGui\Gui\Orm\CListGui.xaml.cs:Zeile 681.
Hello KarlMichael,
Thank you for contacting Infragistics. Have you added all the required assemblies needed for the XamDataGrid?eg.
InfragisticsWPF.dll
InfragisticsWPF.Editors.dll
InfragisticsWPF.DataPresenter.dll
Otherwise, please provide a sample application that demonstrates the behavior.
ok i found the reson on my own:
- Project A has reference to Project B
- Project A had reference to IgDataPresenter.12.1
- Project A defined the style
- Project B had reference to IgDataPresenter.13.1
- Project B used the style With TargetType=IgDataPresenter.12.1.CellValuePresenter (dependencyinjection)
on a XamDataGrid from IgDataPresenter.13.1
So i just forgot for one project to update the assembly references from 12.1 => 13.1
I now update the Project A to 13.1 and the exception does no more occur.
Sorry for the confusion but maybe you can add this to your Q&A database as possible solution for this exception.
The issue can be closed.
Thanks for your reply. I am glad you were able to resolve this.