Skip to main content
Tab

ASPxGridCustomErrorTextEventArgs.Exception Property

Gets the exception.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.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";
    ...
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the Exception property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also