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

DataFormView.CommitMode Property

Gets or sets when to commit values that users enter in the data form’s editors to the bound data object. This is a bindable property.

Namespace: DevExpress.Maui.DataForm

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

Declaration

public CommitMode CommitMode { get; set; }

Property Value

Type Default Description
CommitMode Manually

A value that specifies when input values are committed.

Available values:

Name Description
Manually

A value is validated or committed when the Validate or Commit method is called, respectively.

LostFocus

A value is validated or committed when the editor loses focus.

Input

A value is validated or committed after changes.

Remarks

Each commit method calls validation first. A property value is only committed if it passes validation.

<dxdf:DataFormView x:Name="dataForm" 
                   CommitMode="Input">
    <!-- ... -->
</dxdf:DataFormView>

The DataFormView runs validation mechanisms when it posts an editor’s value to the underlying data item properties. The CommitMode property controls this behavior. If you enable immediate posting in this property (CommitMode = Input), validation also occurs immediately. This means that the CommitMode definition has a higher priority than ValidationMode.

For example, if you set CommitMode to Manually, the underlying data item properties are not posted to the underlying data item object until you call the Commit method. However, validation can be executed either on user input (ValidationMode = Input) or when a user navigates to a different editor in the form (ValidationMode = LostFocus).

See Also