0 out of 1 rated this helpful - Rate this topic

INotifyDataErrorInfo.GetErrors Method

.NET Framework 4.5

Gets the validation errors for a specified property or for the entire entity.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
IEnumerable GetErrors(
	string propertyName
)

Parameters

propertyName
Type: System.String

The name of the property to retrieve validation errors for; or null or Empty, to retrieve entity-level errors.

Return Value

Type: System.Collections.IEnumerable
The validation errors for the property or entity.

This method returns an IEnumerable that can change as asynchronous validation rules finish processing. This enables the binding engine to automatically update the user interface validation feedback when errors are added, removed, or modified.

The return value can change to a different IEnumerable, or it can reuse a previously returned IEnumerable and change its contents. Any changes to the return value should raise the ErrorsChanged event, even if the return value implements INotifyCollectionChanged.

.NET Framework

Supported in: 4.5

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.