Skip to main content

SqlDataSourceUIHelper.ConfigureConnectionParameters(SqlDataSource, ConfigureConnectionContext) Method

Invokes the Connection Editor to edit the parameters used to establish a connection to a data base.

Namespace: DevExpress.DataAccess.UI.Sql

Assembly: DevExpress.DataAccess.v24.1.UI.dll

NuGet Package: DevExpress.DataAccess.UI

Declaration

public static bool ConfigureConnectionParameters(
    this SqlDataSource sqlDataSource,
    ConfigureConnectionContext context
)

Parameters

Name Type Description
sqlDataSource SqlDataSource

A SqlDataSource object, specifying the database connection.

context ConfigureConnectionContext

A ConfigureConnectionContext object, specifying the editor settings.

Returns

Type Description
Boolean

true, if the dialog was finished by clicking the Finish button; otherwise, false.

Remarks

The following code customizes the list of available data providers. It removes all data providers except the MSSqlServer.

using DevExpress.DataAccess.Sql;
using DevExpress.DataAccess.UI.Sql;

  SqlDataSource sqlDS = new SqlDataSource();
    ConfigureConnectionContext config = new ConfigureConnectionContext();
    config.DataProviders.RemoveAll(x => x.ProviderKey != "MSSqlServer");
    SqlDataSourceUIHelper.ConfigureConnectionParameters(sqlDS,config);

Restrict Available Data Providers

See Also