DataViewBase.CommitEditing(Boolean, Boolean) Method

Hides the active editor and posts all the changes made within the focused row to a data source.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

Declaration

public bool CommitEditing(
    bool forceCommit,
    bool cleanError = false
)
Public Function CommitEditing(
    forceCommit As Boolean,
    cleanError As Boolean = False
) As Boolean

Parameters

Name Type Description
forceCommit Boolean

true, to post the changes whether it passes the validation; otherwise, false.

Optional Parameters

Name Type Default Description
cleanError Boolean

False

true, to remove the error notification; otherwise, false.

Returns

Type Description
Boolean

true, if the values within the focused row's cells are valid; otherwise, false.

Remarks

By default, the grid automatically validates the changes made within the focused row when the row focus is about to be moved to another row. If all the new values are valid, they are posted to the grid's data source. Otherwise, the row remains focused until an end-user corrects invalid values. To manually force the row's validation, use the CommitEditing method. If the validation fails, new values are not posted to a data source, and the CommitEditing method returns false. Otherwise, new values are saved and the CommitEditing method returns true.

Calling the CommitEditing method for the master view will commit changes in the currently edited detail row.

To learn more, see Row Validation.

See Also