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
715
Exception when using EditorStyle
posted

Hi,

I'm getting below exception when using EditorStyle in xamdatagrid fieldsettings.

FieldSettings.EditorStyle's TargetType setting can only be null or a type that derives from ValueEditor or is a base class of ValueEditor, XamNumericEditor is invalid.Parameter name: FieldSettings.EditorStyle

Any help is appreciated.

Below is xaml.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<

 

 

 

 

Window

 

 

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation

"

 

 

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml

"

 

 

 

 

 

xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006

"

 

 

 

 

 

xmlns:local="clr-namespace:Localization

"

 

 

 

 

 

xmlns:igEditors="http://infragistics.com/Editors" mc:Ignorable="d" x:Class="Localization.MainWindow

"

 

 

 

 

 

Title="MainWindow" Height="350" Width="525"

>

<

 

 

 

Window.Resources

>

<

 

 

 

ObjectDataProvider x:Key="localData" ObjectType="{x:Type local:DataProvider}" MethodName="GetStudentDetails"

/>

<

 

 

 

Style x:Key="NumericEditorStyle" TargetType="{x:Type igEditors:ValueEditor}"

>

<

 

 

 

Setter Property="Mask" Value="nnnnn"

/>

</

 

 

 

Style

>

</

 

 

 

Window.Resources

>

<

 

 

 

Grid

>

 

<

 

 

 

igDP:XamDataGrid DataContext="{StaticResource localData}" DataSource="{Binding ''}"

>

<

 

 

 

igDP:XamDataGrid.FieldLayouts

>

<

 

 

 

igDP:FieldLayout

>

<

 

 

 

igDP:UnboundField BindingPath="Name" Label="Student Name"

/>

<

 

 

 

igDP:UnboundField Name="Marks" BindingPath="Marks" Label="Student Marks"

>

<

 

 

 

igDP:UnboundField.Settings

>

<

 

 

 

igDP:FieldSettings EditorStyle="{StaticResource NumericEditorStyle}"

/>

</

 

 

 

igDP:UnboundField.Settings

>

</

 

 

 

igDP:UnboundField

>

<

 

 

 

igDP:UnboundField Name="Fee" BindingPath="Fee" Label="Student Fee"

/>

<

 

 

 

igDP:Field Name="Score" Label="Heightest Score"

/>

</

 

 

 

igDP:FieldLayout

>

</

 

 

 

igDP:XamDataGrid.FieldLayouts

>

<

 

 

 

igDP:XamDataGrid.FieldLayoutSettings

>

<

 

 

 

igDP:FieldLayoutSettings AutoGenerateFields="False" AllowDelete="False" AllowAddNew="False"

/>

</

 

 

 

igDP:XamDataGrid.FieldLayoutSettings

>

</

 

 

 

igDP:XamDataGrid

>

 

<

 

 

 

igEditors:XamNumericEditor Margin="0" VerticalAlignment="Top" d:LayoutOverrides="Width" Style="{DynamicResource NumericEditorStyle}"

/>

 

</

 

 

 

Grid

>

</

 

 

 

Window

>

Thanks,

Gohan