DashboardExtractDataSource.ConnectionError Event
Allows users to override the default behavior if connection to a data extract file fails with current connection parameters.
Namespace: DevExpress.DashboardCommon
Assembly: DevExpress.Dashboard.v24.1.Core.dll
NuGet Package: DevExpress.Dashboard.Core
Declaration
Event Data
The ConnectionError event's data class is ExtractConnectionErrorEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets whether the operation performed on the processed event should be canceled. |
DataSourceName | Gets the name of the extract data source. |
DriverName | Gets or sets the name of the custom driver used to manage writing/reading operations for the data extract. |
Exception | Gets the exception that caused the event. |
FileName | Gets or sets the path to the data extract file. |
Handled | Gets or sets whether default actions are required to connect to a data extract file. |
Remarks
The ConnectionError event is fires if connection to a data extract file fails with current connection parameters (for instance, a file is inaccessible). You can handle the ConnectionError event and override the default behavior in this case.
To override the default behavior, do the following:
- Check the data source for which the event has been raised using the ExtractConnectionErrorEventArgs.DataSourceName event parameter.
- Provide a new path to a data extract file using the ExtractConnectionErrorEventArgs.FileName property.
- Set the ExtractConnectionErrorEventArgs.Handled property to true. This will cancel the default routine for providing a new file path.
To cancel connecting to the data extract file, use the ExtractConnectionErrorEventArgs.Cancel property.
To get the exception that caused the event, use the ExtractConnectionErrorEventArgs.Exception property.