Skip to main content
A newer version of this page is available. .

PropertyDefinition.EditSettings Property

Gets or sets an object that specifies the cell editor for the current property definition. This is a dependency property.

Namespace: DevExpress.Xpf.PropertyGrid

Assembly: DevExpress.Xpf.PropertyGrid.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.PropertyGrid, DevExpress.Wpf.PropertyGrid

Declaration

public BaseEditSettings EditSettings { get; set; }

Property Value

Type Description
BaseEditSettings

A BaseEditSettings descendant that specifies the cell editor.

Remarks

Cell values are edited using editors that ship with the WPF Data Editors. Each editor has a helper class (a BaseEditSettings descendant) that is responsible for the editor’s functionality. When the same editor is used in multiple locations, the property grid uses this helper class to paint its cells. The actual editor is only created when a user starts editing a cell and is automatically deleted when editing is completed.

Use the EditSettings property to assign the required editor. PropertyGridControl automatically assigns editors to the edit fields based on the corresponding property type. To learn more, see Property Definitions.

The following example demonstrates how to assign editors to property grid rows based on the property path and type.

xmlns:sys="clr-namespace:System;assembly=mscorlib"
...
<Window.DataContext>
    <local:ViewModel/>
</Window.DataContext>
...
<dxprg:PropertyGridControl SelectedObject="{Binding Data}" ShowProperties="All">
    <dxprg:PropertyDefinition Path="ID" IsReadOnly="True"/>
    <dxprg:PropertyDefinition Type="sys:DateTime">
        <dxprg:PropertyDefinition.EditSettings>
            <dxe:DateEditSettings DisplayFormat="MMM-dd-yyyy"/>
        </dxprg:PropertyDefinition.EditSettings>
    </dxprg:PropertyDefinition>
    <dxprg:PropertyDefinition Type="sys:String">
        <dxprg:PropertyDefinition.EditSettings>
            <dxe:TextEditSettings MaxLength="15"/>
        </dxprg:PropertyDefinition.EditSettings>
    </dxprg:PropertyDefinition>
</dxprg:PropertyGridControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditSettings property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also