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

GridView.CloseEditForm() Method

Saves changes and closes an Edit Form if data has been saved successfully.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

public virtual bool CloseEditForm()

#Returns

Type Description
Boolean

true if data is saved successfully and an Edit Form is closed; otherwise, false.

#Remarks

This method saves changes, and if data is successfully saved, closes an Edit Form. If it is not possible to save data (for instance, if data is not valid), the CloseEditForm method returns false and does not close an Edit Form. To close an Edit Form without saving changes, use the GridView.HideEditForm method.

See Also