GridView.ShowEditForm() Method
Opens an Edit Form for the focused row.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v25.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
Remarks
The ShowEditForm
method opens an Edit Form for the focused row if the GridOptionsBehavior.EditingMode property is set to one of the following values:
- EditFormInplace or EditFormInplaceHideCurrentRow – an Edit Form is displayed as an inline panel.
- EditForm – an Edit Form is displayed as a modal window.
Note
If the GridView lacks sufficient space to display an inline Edit Form, a modal Edit Form window is displayed.
The following code snippet shows a modal Edit Form window on a button click:
using DevExpress.XtraGrid.Views.Grid;
gridView1.OptionsBehavior.EditingMode = GridEditingMode.EditForm;
// ...
void editButton_Click(object sender, EventArgs e) {
gridView1.ShowEditForm();
}
See Also