Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: 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.

public class ViewModel {
    public SimpleModel Data { get; set; }
    public ViewModel() {
        Data = new SimpleModel()
        {
            ID = 0,
            FirstName = "Anna",
            LastName = "Trujilo",
            Birthday = new DateTime(1987, 09, 14)
        };
    }
}

public class SimpleModel {
    public int ID { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public DateTime Birthday { get; set; }
}
See Also