Back to Devexpress

ASPxDashboard.ConnectionError Event

dashboard-devexpress-dot-dashboardweb-dot-aspxdashboard-a334f512.md

latest4.2 KB
Original Source

ASPxDashboard.ConnectionError Event

Allows you to override the default behavior if data store connection fails with current connection parameters.

Namespace : DevExpress.DashboardWeb

Assembly : DevExpress.Dashboard.v25.2.Web.WebForms.dll

NuGet Package : DevExpress.Web.Dashboard

Declaration

csharp
public event ConnectionErrorWebEventHandler ConnectionError
vb
Public Event ConnectionError As ConnectionErrorWebEventHandler

Event Data

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

PropertyDescription
CancelGets or sets whether the operation performed on the processed event should be canceled. Inherited from ConnectionErrorEventArgs.
ConnectionNameGets the name of the connection for which the event has been raised. Inherited from ConfigureDataConnectionEventArgs.
ConnectionParametersGets or sets parameters used to establish a connection to data. Inherited from ConfigureDataConnectionEventArgs.
DashboardIdGets the dashboard identifier.
DataSourceNameGets the data source name.
ExceptionGets an exception that caused the ConnectionError event. Inherited from ConnectionErrorEventArgs.
HandledGets or sets whether default actions are required to connect to a data store. Inherited from ConnectionErrorEventArgs.

Remarks

The ConnectionError event fires if connection to a data store fails with current connection parameters (for instance, the database is inaccessible). You can handle the ConnectionError event and override the default behavior in this case.

To override the default behavior, do the following:

To cancel connecting to the data store, use the ConnectionErrorEventArgs.Cancel property.

To get the exception that caused the event, use the ConnectionErrorEventArgs.Exception property.

See Also

ASPxDashboard Class

ASPxDashboard Members

DevExpress.DashboardWeb Namespace