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
975
CellValuePresenter style with setter for Template causes exception
posted

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.