Skip to main content
A newer version of this page is available. .

DataViewBase.CommitEditing() Method

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

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.Core.dll

Declaration

public bool CommitEditing()

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