Skip to main content

XlDataValidation.ShowErrorMessage Property

Gets or sets whether to show the error message when the user input is not valid.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public bool ShowErrorMessage { get; set; }

Property Value

Type Description
Boolean

true, to show the error message; otherwise, false.

Remarks

Use the XlDataValidation.ErrorTitle property to specify the dialog caption. Use the XlDataValidation.ErrorMessage property to specify the message to display in the dialog. The XlDataValidation.ErrorStyle property specifies the type of the alert window.

The code sample below shows how to show the warning message when the entered data in invalid:

// Display the error message.
validation.ErrorMessage = "The salary amount must be between 600$ and 2000$.";
validation.ErrorTitle = "Warning";
validation.ErrorStyle = XlDataValidationErrorStyle.Warning;
validation.ShowErrorMessage = true;
See Also