Skip to main content
A newer version of this page is available. .
Tab

ASPxGridCustomErrorTextEventArgs.ErrorText Property

Gets or sets the error text.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.2.dll

Declaration

public string ErrorText { get; set; }

Property Value

Type Description
String

A String value that specifies the error text.

Remarks

Online Example

Example

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

protected void ASPxGridView1_CustomErrorText(object sender,
DevExpress.Web.ASPxGridViewCustomErrorTextEventArgs e) {
    if (e.Exception is NullReferenceException)
        e.ErrorText = "NullReferenceException Text";
    else if (e.Exception is InvalidOperationException)
        e.ErrorText = "InvalidOperationException Text";
    ...
}
See Also