Back to Devexpress

ColumnBase.ShowValidationAttributeErrors Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-489e6458.md

latest3.0 KB
Original Source

ColumnBase.ShowValidationAttributeErrors Property

Gets or sets whether error icons are 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.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public DefaultBoolean ShowValidationAttributeErrors { get; set; }
vb
Public Property ShowValidationAttributeErrors As DefaultBoolean

Property Value

TypeDescription
DefaultBoolean

A DefaultBoolean enumeration value that specifies whether error icons are displayed within column cells that fail validation.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

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. If the ShowValidationAttributeErrors property is set to DefaultBoolean.Default, the visibility of error icons is specified by the view’s DataViewBase.ShowValidationAttributeErrors property.

To learn more, see Attributes-Based Validation.

See Also

ShowValidationAttributeErrors

AllowCommitOnValidationAttributeError

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace