Skip to main content
Tag

ColumnBase.EditFormTemplate Property

Gets or sets a template of the editor associated with the current column in the edit form.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public DataTemplate EditFormTemplate { get; set; }

Property Value

Type Description
DataTemplate

The template that defines the appearance of a data editor. The template’s data context is a DevExpress.Xpf.Grid.EditForm.EditFormCellData object.

Remarks

A template specified by the EditFormTemplate property is applied to the editor displayed in the edit form.

The following example demonstrates the GridControl that displays the inline edit form. The SpinEdit editor is used for the Visits field.

<dxg:GridControl ItemsSource="{Binding Data}">
    <dxg:GridControl.View>
        <dxg:TableView EditFormShowMode="Inline">
        </dxg:TableView>
    </dxg:GridControl.View>
    <dxg:GridColumn FieldName="Name" />
    <dxg:GridColumn FieldName="City" />
    <dxg:GridColumn FieldName="IsOccupied" />
    <dxg:GridColumn FieldName="Visits">
        <!-- Edit form displays a spin editor for the Visits field -->
        <dxg:GridColumn.EditFormTemplate>
            <DataTemplate>
                <dxe:SpinEdit Name="PART_Editor"/>
            </DataTemplate>
        </dxg:GridColumn.EditFormTemplate>
    </dxg:GridColumn>
    <dxg:GridColumn FieldName="Birthday" />
</dxg:GridControl>

Refer to the following help topic for more information: Appearance Customization.

See Also