wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-f29d1130.md
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.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public DataTemplate EditFormTemplate { get; set; }
Public Property EditFormTemplate As DataTemplate
| Type | Description |
|---|---|
| DataTemplate |
The template that defines the appearance of a data editor.
|
The template specified by the EditFormTemplate property is applied to the editor displayed in the edit form.
The EditFormEditor objects defined in the TableView.EditFormTemplate use the EditFormTemplate to display the column’s editor.
You can use the EditFormTemplate property to specify a custom editor for the column:
Name property to PART_Editor.The following example demonstrates a GridControl that displays the inline edit form. The SpinEdit editor is used for the Quantity field.
<dxg:GridControl ItemsSource="{Binding Source}">
<dxg:GridControl.View>
<dxg:TableView EditFormShowMode="Inline"/>
</dxg:GridControl.View>
<!-- ... -->
<dxg:GridColumn FieldName="Quantity">
<dxg:GridColumn.EditFormTemplate>
<DataTemplate>
<dxe:SpinEdit Name="PART_Editor" IsFloatValue="False"/>
</DataTemplate>
</dxg:GridColumn.EditFormTemplate>
</dxg:GridColumn>
</dxg:GridControl>
The template’s data context is a DevExpress.Xpf.Grid.EditForm.EditFormCellData object. Use the following binding paths to access cell values, columns, and ViewModel properties:
Value - Access the current cell value.
EditorViewInfo - Access the current column.
RowData.Source.Row.[YourPropertyName] - Access a property of an object from the ItemsSource collection.
RowData.Source.DataContext.[FieldName] - Access unbound column values.
RowData.Source.View.DataContext.[YourPropertyName] - Access a property in a grid’s ViewModel.
Refer to the following help topic for more information: Edit Form.
See Also