Tab

ASPxGridCustomErrorTextEventArgs.Exception Property

Gets the exception.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public Exception Exception { get; }

Property Value

Type Description
Exception

A Exception object that represents the exception.

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