GridView.ShowEditForm() Method
Opens an Edit Form for the focused row.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v25.2.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();
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowEditForm() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.