Back to Devexpress

XlDataValidation.ShowErrorMessage Property

corelibraries-devexpress-dot-export-dot-xl-dot-xldatavalidation-7f699264.md

latest2.2 KB
Original Source

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.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public bool ShowErrorMessage { get; set; }
vb
Public Property ShowErrorMessage As Boolean

Property Value

TypeDescription
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:

csharp
// 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;
vb
' 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

XlDataValidation Class

XlDataValidation Members

DevExpress.Export.Xl Namespace