Tag

ColumnBase.ActualShowValidationAttributeErrors Property

Gets whether error icons can be displayed within column cells that fail validation specified by the Data Annotations attribute(s). This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public bool ActualShowValidationAttributeErrors { get; }
Public ReadOnly Property ActualShowValidationAttributeErrors As Boolean

Property Value

Type Description
Boolean

true if errors can be displayed 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 (ErrorIcon_Critical) within cells with invalid values, and provides error descriptions displayed as tooltips (see the image below). In this case, the cell focus cannot be moved to another cell until the cell's value is corrected.

attributes-based validation

To override the default behavior and hide errors, set the ColumnBase.ShowValidationAttributeErrors property to false. If the ColumnBase.ShowValidationAttributeErrors property is set to DefaultBoolean.Default, the visibility of error icons is specified by the view's DataViewBase.ShowValidationAttributeErrors property. In this case, use the ActualShowValidationAttributeErrors property to obtain whether validation errors are allowed to be displayed within column cells.

To learn more, see Attributes-Based Validation.

See Also