Skip to main content

DXCollectionView.ValidateAndSave Event

Allows you to validate data item values before they are committed to the data source.

Namespace: DevExpress.Maui.CollectionView

Assembly: DevExpress.Maui.CollectionView.dll

NuGet Package: DevExpress.Maui.CollectionView

Declaration

public event EventHandler<ValidateItemEventArgs> ValidateAndSave

Event Data

The ValidateAndSave event's data class is ValidateItemEventArgs. The following properties provide information specific to this event:

Property Description
AutoUpdateItemsSource Gets or sets whether the control should update the source of items when editing is finished.
Context Gets the context object.
DataChangeType Gets the operation type.
IsValid Gets or sets whether the new value is valid.
Item Gets the control’s item whose value is changed.
SourceIndex Gets the index (in the data source) of the item that is changed.

The event data class exposes the following methods:

Method Description
ForceUpdateItemsSource() Forces the update of items source.

Remarks

The DXCollectionView runs validation mechanisms after a user taps the Save button in the edit form in a built-in detail form or after you call the DetailEditFormViewModel.Save() method for a custom form.

See Also