Tag

ColumnBase.EditSettings Property

Gets or sets an object that contains the column editor's settings. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll

Declaration

public BaseEditSettings EditSettings { get; set; }
Public Property EditSettings As BaseEditSettings

Property Value

Type Description
BaseEditSettings

A BaseEditSettings descendant that specifies the column's editor.

Remarks

TIP

Topic: In-place Editors

TIP

Demo: Cell Editors

Requires installation of the WPF Subscription. Download

The GridControl automatically creates an editor for a column based on its value type. For example, if a column is bound to a DateTime field, the GridControl creates a date editor for it. If a column is bound to a numeric field, the numeric editor is used. Otherwise, the text editor is used.

Each editor has a helper class responsible for the editor's functionality:

Use the column's EditSettings property to specify an in-place editor for a column.

The following code sample shows how to assign a spin editor to the UnitPrice column:

<dxg:GridColumn x:Name="colUnitPrice" FieldName="UnitPrice">
    <dxg:GridColumn.EditSettings>
        <dxe:SpinEditSettings MaxValue="999" MinValue="1" DisplayFormat="c2"/>
    </dxg:GridColumn.EditSettings>
</dxg:GridColumn>

When the same editor is used in multiple locations, the GridControl uses the helper class to paint its cells. The actual editors are only created when end users start to edit a cell and are automatically destroyed when editing is completed. This improves the application's performance.

To obtain a column's actual editor, use the ColumnBase.ActualEditSettings property. This property returns the editor's helper class that is responsible for the editor's functionality and behavior.

See Also