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

ConfigureDataConnectionEventArgs Class

Provides data for the ConfigureDataConnection events.

Namespace: DevExpress.DataAccess.Sql

Assembly: DevExpress.DataAccess.v17.2.dll

Declaration

public class ConfigureDataConnectionEventArgs :
    EventArgs

Remarks

The ConfigureDataConnectionEventArgs class provides data for ConfigureDataConnection events (for instance, DashboardDesigner.ConfigureDataConnection, DashboardViewer.ConfigureDataConnection and SnapDocument.ConfigureDataConnection).

These events are fired when the Dashboard Designer or Viewer connects to a database. Handle these events to change the parameters required to establish a connection to data (for instance, the server name, the database name, user credentials, the path to a data file, etc).

The ConfigureDataConnectionEventArgs class provides the ConfigureDataConnectionEventArgs.ConnectionName property used to identify the connection for which the event is raised. To access the connection parameters, use the ConfigureDataConnectionEventArgs.ConnectionParameters property.

The ConfigureDataConnectionEventArgs.ConnectionParameters property returns a DataConnectionParametersBase descendant. Different DataConnectionParametersBase descendants provide connection parameters for different DBMS and data file formats. The MsSqlConnectionParameters, OracleConnectionParameters, XmlFileConnectionParameters and many other classes are available.

To edit current connection parameters, cast the returned DataConnectionParametersBase object to an appropriate descending type and then adjust the parameters. To change the data provider, create an object of an appropriate descending type, customize the parameters and assign the created object to the ConfigureDataConnectionEventArgs.ConnectionParameters property.

See Also