Skip to main content

EditFormShowingEventArgs.Allow Property

Gets or sets whether opening an Edit Form is allowed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid


public bool Allow { get; set; }

Property Value

Type Description

true if opening an Edit Form is allowed; otherwise, false.


When you handle the GridView.EditFormShowing event, you can get or set whether opening an Edit Form is allowed via the Allow property. Using this property, you can cancel opening an Edit Form.


The following example shows how to prohibit an Edit Form from opening in specific rows.

In this example, the GridView.EditFormShowing event is handled and the Allow event parameter is set to false for orders shipped to France.

using DevExpress.XtraGrid.Views.Grid;

gridView1.EditFormShowing += new EditFormShowingEventHandler(OnEditFormShowing);
private void OnEditFormShowing(object sender, EditFormShowingEventArgs e) {
    GridView view = sender as GridView;
    if (view == null) return;
    if (view.GetRowCellValue(e.RowHandle, "ShipCountry").ToString() == "France") e.Allow = false;
See Also