Back to Devexpress

IRule.UsedProperties Property

expressappframework-devexpress-dot-persistent-dot-validation-dot-irule.md

latest2.3 KB
Original Source

IRule.UsedProperties Property

Specifies the names of the properties to be highlighted when the current Validation Rule is broken.

Namespace : DevExpress.Persistent.Validation

Assembly : DevExpress.Persistent.Base.v25.2.dll

NuGet Package : DevExpress.Persistent.Base

Declaration

csharp
ReadOnlyCollection<string> UsedProperties { get; }
vb
ReadOnly Property UsedProperties As ReadOnlyCollection(Of String)

Property Value

TypeDescription
ReadOnlyCollection<String>

A ReadOnlyCollection<String> object representing a list of the property names that must be highlighted as invalid when the Validation Rule is broken.

|

Remarks

The Validation Module can highlight Property Editors in a View when a Validation Rule is broken. When implementing the IRule interface, to highlight properties containing invalid values, pass the required property names via the UsedProperties property.

csharp
using System.Collections.ObjectModel;
// ...
public override ReadOnlyCollection<string> UsedProperties {
    get {
        return new ReadOnlyCollection<string>(new List<string>() { "Amount" });
    }
}

Important

Always define UsedProperties for warning and info rules.

See Also

IRule Interface

IRule Members

DevExpress.Persistent.Validation Namespace