DataViewBase.ShowValidationAttributeErrors Property
Gets or sets whether error icons are displayed within cells that fail validation specified by the Data Annotations attribute(s). This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v19.1.Core.dll
Declaration
Property Value
Type | Description |
---|---|
Boolean | true to display errors within cells that fail validation specified by the Data Annotations attribute(s); otherwise, false. |
Remarks
The WPF Grid and TreeList controls support DataAnnotations attributes that specify data validation rules (to use data annotation attributes, reference the System.ComponentModel.DataAnnotations assembly).
By default, the grid (or treelist) displays error icons () within cells with invalid values, and provides error descriptions displayed as tooltips (see the image below). In this instance, the cell focus cannot be moved to another cell until the cell’s value is corrected.
To override the default behavior and hide errors, set the ShowValidationAttributeErrors property to false. To override the default behavior for individual columns, use the ColumnBase.ShowValidationAttributeErrors property.
To learn more, see Attributes-Based Validation.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowValidationAttributeErrors property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.