Back to Devexpress

TableView.EditFormShowing Event

wpf-devexpress-dot-xpf-dot-grid-dot-tableview-8d67b14c.md

latest2.8 KB
Original Source

TableView.EditFormShowing Event

Occurs when the Table View is about to display the Edit Form.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(false)]
public event EventHandler<EditFormShowingEventArgs> EditFormShowing
vb
<Browsable(False)>
Public Event EditFormShowing As EventHandler(Of EditFormShowingEventArgs)

Event Data

The EditFormShowing event's data class is EditFormShowingEventArgs. The following properties provide information specific to this event:

PropertyDescription
AllowGets or sets a value that indicates whether to show the edit form.
RowHandleGets the handle of the row that raised the event.

Remarks

In v21.2+ , handle the RowEditStarting, RowEditStarted, and RowEditFinished events to process how a user interacts with the Edit Form. You can also create commands in a View Model and bind them to the RowEditStartingCommand, RowEditStartedCommand, and RowEditFinishedCommand properties.

The EditFormShowing event allows you to cancel the operation (suppress the Edit Form). The following example disables the Edit Form for odd rows:

csharp
private void TableView_EditFormShowing(object sender, DevExpress.Xpf.Grid.EditFormShowingEventArgs e) {
    if(e.RowHandle % 2 != 0) {
        e.Allow = false;
    }
}

See Also

Edit Entire Row

TableView Class

TableView Members

DevExpress.Xpf.Grid Namespace