Skip to main content

GridView.EditFormHidden Event

Fires after the Edit Form is closed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DXCategory("Editor")]
public event EditFormHiddenEventHandler EditFormHidden

Event Data

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

Property Description
BindableControls Provides access to the collection of controls used to edit the processed data record. Controls are indexed by field names or grid columns. Inherited from EditFormEventArgsBase.
Panel Gets the container that arranges editors and buttons on the Edit Form. Inherited from EditFormEventArgsBase.
Result Gets the clicked button.
RowHandle Gets the handle that identifies the grid row for which the Edit From is displayed/hidden. Inherited from EditFormEventArgsBase.

Remarks

The EditFormPrepared and ShowingPopupEditForm events allow you to access the Edit Form‘s editors, for example, you can subscribe to an editor’s events. Use the EditFormHidden event to unsubscribe from the events.

Tip

The ValidateRow and RowUpdated events fire before and after changes are applied to a row. You can also handle these events to perform custom actions before and after the Edit Form is closed.

Example

The code below shows how to use the EditFormPrepared and EditFormHidden events to subscribe/unsubscribe to/from an editor’s events.

using DevExpress.XtraEditors.Controls;

gridView1.EditFormPrepared += GridView1_EditFormPrepared;
gridView1.EditFormHidden += GridView1_EditFormHidden;

private void GridView1_EditFormPrepared(object sender, DevExpress.XtraGrid.Views.Grid.EditFormPreparedEventArgs e) {
    TextEdit textEdit = e.BindableControls[colOrderID] as TextEdit;
    if(textEdit != null)
        textEdit.EditValueChanging += TextEdit_EditValueChanging;
}

private void TextEdit_EditValueChanging(object sender, ChangingEventArgs e) {
    // ...
}

private void GridView1_EditFormHidden(object sender, DevExpress.XtraGrid.Views.Grid.EditFormHiddenEventArgs e) {
    TextEdit textEdit = e.BindableControls[colOrderID] as TextEdit;
    if(textEdit != null)
        textEdit.EditValueChanging -= TextEdit_EditValueChanging;
}
See Also