The requested page is not available for the requested platform. You are viewing the content for Default platform.

RuleFromBoolPropertyAttribute.UsedProperties Property

Specifies the names of the properties to be highlighted when the rule generated from the current attribute is broken.

Namespace: DevExpress.Persistent.Validation

Assembly: DevExpress.Persistent.Base.v19.1.dll


public string UsedProperties { get; set; }
Public Property UsedProperties As String

Property Value

Type Description

A string value that lists the names of the properties that must be highlighted as invalid when the rule is broken. The names must be separated by a comma.


Typically, the target property of the RuleFromBoolPropertyAttribute is marked by the NonPersistent attribute, because this property is declared to calculate whether the combination of data of the current object is correct. When this property returns false, the rule generated from the applied RuleFromBoolProperty attribute is broken. In most cases, the target property should be hidden, since it does not mean anything for end-users. However, when the rule is broken, the properties that contain incorrect data must be highlighted so the end-users can correct the data. To highlight the required properties, their names must be passed as the UsedProperties parameter in the RuleFromBoolProperty attribute.

Since the UsedProperties parameter is a named parameter, it is not necessary to pass its value. If you do not pass, the target property is highlighted as an incorrect one. In this instance, the target property must be visible, so that an end-user can understand what data must be corrected.


Always define UsedProperties for warning and info rules.

To see an example, refer to the RuleFromBoolPropertyAttribute class description. In addition, you can see an example in the Validation section of the FeatureCenter Demo. This demo is located in the %PUBLIC%\Documents\DevExpress Demos 19.1\Components\eXpressApp Framework\FeatureCenter folder, by default.

See Also