TreeListView.EditFormShowing Event

Occurs when the TreeListView is about to display the Edit Form.

Namespace: DevExpress.Xpf.Grid

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

Declaration

[Browsable(false)]
public event EventHandler<EditFormShowingEventArgs> EditFormShowing

Event Data

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

Property Description
Allow Gets or sets a value that indicates whether to show the edit form.
RowHandle Gets the handle of the row that raised the event.

Remarks

In v21.2+, handle the NodeEditStarting, NodeEditStarted, and NodeEditFinished 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 NodeEditStartingCommand, NodeEditStartedCommand, and NodeEditFinishedCommand properties.

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

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