Tab

ASPxCardView.CustomErrorText Event

Enables you to provide custom error descriptions.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public event ASPxCardViewCustomErrorTextEventHandler CustomErrorText
Public Event CustomErrorText As ASPxCardViewCustomErrorTextEventHandler

Event Data

The CustomErrorText event's data class is ASPxCardViewCustomErrorTextEventArgs. The following properties provide information specific to this event:

Property Description
ErrorText Gets or sets the error text. Inherited from ASPxGridCustomErrorTextEventArgs.
ErrorTextKind Indicates the error source. Inherited from ASPxGridCustomErrorTextEventArgs.
Exception Gets the exception. Inherited from ASPxGridCustomErrorTextEventArgs.

Remarks

The CustomErrorText event occurs when any exception is raised within the ASPxCardView, and allows you to change the error text displayed by default. This can be useful, if you want to localize error messages.

Use the ASPxGridCustomErrorTextEventArgs.ErrorText property to specify the error text.

The exception can be obtained via the ASPxGridCustomErrorTextEventArgs.Exception property. If the exception has been raised within the ASPxCardView.CardValidating event handler, the ASPxGridCustomErrorTextEventArgs.ErrorTextKind property returns GridErrorTextKind.RowValidate. Otherwise, it returns GridErrorTextKind.General.

Examples

The code sample below demonstrates how you can handle the CustomErrorText event to specify the particular error text, based on the exception type.