wpf-devexpress-dot-xpf-dot-grid-dot-tableview-2e283bf5.md
Gets or sets the binding that allows you to define the edit form caption.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public BindingBase EditFormCaptionBinding { get; set; }
Public Property EditFormCaptionBinding As BindingBase
| Type | Description |
|---|---|
| BindingBase |
A BindingBase descendant that defines the edit form caption.
|
When the grid’s edit form is in dialog mode, it can display a caption. Use the EditFormCaptionBinding property to configure the edit dialog caption. The DataContext for this binding is the RowData object that represents the row that is being edited.
The following example demonstrates the grid control that displays a list of customers. The edit dialog caption contains the name of the selected customer.
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
...
<dxg:GridControl Name="gC" ItemsSource="{Binding Data}">
<dxg:GridControl.View>
<dxg:TableView EditFormShowMode="Dialog">
<dxg:TableView.EditFormCaptionBinding>
<Binding Path="Row.Name" RelativeSource="{RelativeSource Self}"/>
</dxg:TableView.EditFormCaptionBinding>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl>
...
public class ViewModel {
public List<object> Data { get; set; }
public ViewModel() {
Data = new List<object>();
Data.Add(new Customer { Id = 0, Name = "Jeff Jackson"});
Data.Add(new Customer { Id = 1, Name = "Peter Jones" });
}
}
public class Customer {
public int Id { get; set; }
public string Name { get; set; }
}
See Also