EditorStyle Property (FieldSettings)

The style for the Infragistics.Windows.Editors.ValueEditor used within a cell
Public Property EditorStyle As Style
public Style EditorStyle {get; set;}
System.ArgumentExceptionAn Argument exception is thrown if the TargetType of the style is not set to a class derived from ValueEditor.

The TargetType of the style must me set to a class derived from Infragistics.Windows.Editors.ValueEditor, otherwise an exception will be thrown.

If either the Infragistics.Windows.Editors.ValueEditor.EditTemplate or Template properties are not set on the style then default templates will be supplied based on look.

Refer to the Editors topic in the Developer's Guide for an explanation of editors.

Refer to the Editing Cell Values topic in the Developer's Guide for an explanation of how editing works.

Refer to the Working with xamDataGrid, xamDataCarousel and xamDataPresenter Styling Points topic in the Developer's Guide for an explanation of how to style the control.

The following sample demonstrates how to initialize a field so that it uses a custom EditorStyle. In this example, the field is being set up to use a XamMaskedEditor with a specific mask and a ValueConstraint that ensures that the value entered is as greater than 0.
DataSource="{Binding Source={StaticResource OrdersDataSource}, XPath=Order}">
<igDP:Field Name="Title" Column="0"/>
<igDP:Field Name="Price" Column="1">
<igDP:FieldSettings EditAsType="{x:Type sys:Decimal}">
<Style TargetType="{x:Type igEditors:XamMaskedEditor}" >
<Setter Property="Mask" Value="{}{currency:6.2}" />
<Setter Property="ValueConstraint">
<!-- Must be greater than 0 -->
<igEditors:ValueConstraint MinExclusive="0" />

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also