Back to Devexpress

DXCollectionView.ValidateAndSave Event

maui-devexpress-dot-maui-dot-collectionview-dot-dxcollectionview-f8a18f99.md

latest2.6 KB
Original Source

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

csharp
public event EventHandler<ValidateItemEventArgs> ValidateAndSave

Event Data

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

PropertyDescription
AutoUpdateItemsSourceGets or sets whether the data source associated with the validation context updates automatically when the validation is successful. This is a bindable property.
ContextGets the context or metadata associated with the validation event.
DataChangeTypeGets the type of changed data.
IsValidGets or sets whether the item is valid. This is a bindable property.
IsValidAsyncGets or sets whether the validated item meets the criteria. This is a bindable property.
ItemGets the item validated in the event.
SourceIndexGets the index of the validated item in the data source.

The event data class exposes the following methods:

MethodDescription
ForceUpdateItemsSource()Updates the item data source to reflect any changes during validation.

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.SaveAsync() method for a custom form.

See Also

DXCollectionView Class

DXCollectionView Members

DevExpress.Maui.CollectionView Namespace