View.ErrorMessages Property

Provides access to the current View's message collection.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public ErrorMessages ErrorMessages { get; }
Public ReadOnly Property ErrorMessages As ErrorMessages

Property Value

Type Description
DevExpress.ExpressApp.Utils.ErrorMessages

An ErrorMessages object which is used to access the messages.

Remarks

Each message contains an image and text associated with a specific property name. For instance, the following code adds a message to the Subject property.

View.ErrorMessages.AddMessage(
    "Subject",
    View.CurrentObject,
    "Specifies the task subject",
    ImageLoader.Instance.GetImageInfo("Action_AboutInfo")
    );

The result in an ASP.NET and WinForms application is demonstrated below.

ErrorMessages

The ErrorMessages property is used by the Validation Module's ResultsHighlightController (see Built-in Controllers and Actions in Extra Modules).

See Also