Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListView.EditFormShowing Event

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

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

#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