Back to Devexpress

IDataErrorInfoHelper.GetErrorText(Object, String) Method

corelibraries-devexpress-dot-mvvm-dot-idataerrorinfohelper-dot-geterrortext-x28-system-dot-object-system-dot-string-x29.md

latest3.0 KB
Original Source

IDataErrorInfoHelper.GetErrorText(Object, String) Method

Returns the error text for the specified property.

Namespace : DevExpress.Mvvm

Assembly : DevExpress.Mvvm.v25.2.dll

NuGet Packages : DevExpress.Mvvm, DevExpress.Win.Navigation

Declaration

csharp
public static string GetErrorText(
    object owner,
    string propertyName
)
vb
Public Shared Function GetErrorText(
    owner As Object,
    propertyName As String
) As String

Parameters

NameTypeDescription
ownerObject

A System.Object object, which is the owner of the specified property.

| | propertyName | String |

A System.String value that specifies the name of the property.

|

Returns

TypeDescription
String

A System.String value that describes the error of the specified property.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetErrorText(Object, String) method.

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.

wpf-mvvm-framework-validationerrorshostbehavior/CS/ValidationErrorHostBehavior/ViewModels/MainViewModel.cs#L33

csharp
get {
    return IDataErrorInfoHelper.GetErrorText(this, columnName);
}

wpf-mvvm-framework-validationerrorshostbehavior/VB/ValidationErrorHostBehavior/ViewModels/MainViewModel.vb#L47

vb
Get
    Return IDataErrorInfoHelper.GetErrorText(Me, columnName)
End Get

See Also

IDataErrorInfoHelper Class

IDataErrorInfoHelper Members

DevExpress.Mvvm Namespace