Skip to main content

SqlDataSourceUIHelper Class

Provides functionality to configure the connection to a SqlDataSource in code.

Namespace: DevExpress.DataAccess.UI.Sql

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

NuGet Package: DevExpress.DataAccess.UI

Declaration

public static class SqlDataSourceUIHelper

Remarks

View Example: Use the SqlDataSourceUIHelper to Edit the SqlDataSource Connection and Query at Runtime

The SqlDataSourceUIHelper provides an application programming interface (API) to invoke various tools available to end-users for configuring the data connection settings in an application.

  • To manage the data connection settings without writing any code, use the Query Builder of a SqlDataSource component.

    After a SQL Data Source is created, you can configure it by using the commands available in its smart tag.

    data-access-winforms-sql-data-source-component-smart-tag-commands

  • To configure a data connection in code, use the extension methods of the SqlDataSourceUIHelper class (requires referencing the DevExpress.DataAccess.v24.1.UI.dll assembly for an application).

    For example, after adding two or more queries to a data connection, it becomes possible to configure their data relations by using the Master-Detail Relations Editor (invoked by calling the SqlDataSourceUIHelper.ManageRelations method of the SqlDataSourceUIHelper class).

    sql-data-source-manage-relations-master-detail-relation-editor

Inheritance

Object
SqlDataSourceUIHelper
See Also