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

EditFormShowingEventArgs.RowHandle Property

Gets the row handle that identifies the grid row for which an Edit Form is opening.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public int RowHandle { get; }

#Property Value

Type Description
Int32

The row handle that identifies the grid row for which an Edit Form is opening.

#Remarks

When you handle the GridView.EditFormShowing event, you can get the row handle that identifies the grid row for which an Edit Form is opening via the RowHandle property. To learn more on how to identify rows, see the Rows topic.

#Example

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