Version

EditorStyle Property (FieldSettings)

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

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.

Example
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.
<igDP:XamDataGrid 
    
DataSource="{Binding Source={StaticResource OrdersDataSource}, XPath=Order}">
    
<igDP:XamDataGrid.FieldLayouts>
        
<igDP:FieldLayout>
            
            
<igDP:FieldLayout.Fields>
                
<igDP:Field Name="Title" Column="0"/>
                
<igDP:Field Name="Price" Column="1">
                    
                    
<igDP:Field.Settings>
                        
<igDP:FieldSettings EditAsType="{x:Type sys:Decimal}">
                            
<igDP:FieldSettings.EditorStyle>
                                
<Style TargetType="{x:Type igEditors:XamMaskedEditor}" >
                                    
<Setter Property="Mask" Value="{}{currency:6.2}" />
                                    
<Setter Property="ValueConstraint">
                                        
<Setter.Value>
                                            
<!-- Must be greater than 0 -->
                                            
<igEditors:ValueConstraint MinExclusive="0" />
                                        
</Setter.Value>
                                    
</Setter>
                                
</Style>
                            
</igDP:FieldSettings.EditorStyle>
                        
</igDP:FieldSettings>
                    
</igDP:Field.Settings>
                    
                
</igDP:Field>
            
</igDP:FieldLayout.Fields>
            
        
</igDP:FieldLayout>
    
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Requirements

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