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
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:UnboundField
igDP:UnboundField Name="Fee" BindingPath="Fee" Label="Student Fee"
igDP:Field Name="Score" Label="Heightest Score"
igDP:XamDataGrid.FieldLayoutSettings
igDP:FieldLayoutSettings AutoGenerateFields="False" AllowDelete="False" AllowAddNew="False"
igDP:XamDataGrid
igEditors:XamNumericEditor Margin="0" VerticalAlignment="Top" d:LayoutOverrides="Width" Style="{DynamicResource NumericEditorStyle}"
Thanks,
Gohan
Removing and Adding references fixed the problem.