Back to Devexpress

ASPxDashboard.SetDBSchemaProvider(IDBSchemaProviderEx) Method

dashboard-devexpress-dot-dashboardweb-dot-aspxdashboard-dot-setdbschemaprovider-x28-devexpress-dot-dataaccess-dot-sql-dot-idbschemaproviderex-x29.md

latest4.3 KB
Original Source

ASPxDashboard.SetDBSchemaProvider(IDBSchemaProviderEx) Method

Specifies a database schema provider for the Web Dashboard.

Namespace : DevExpress.DashboardWeb

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

NuGet Package : DevExpress.Web.Dashboard

Declaration

csharp
public void SetDBSchemaProvider(
    IDBSchemaProviderEx provider
)
vb
Public Sub SetDBSchemaProvider(
    provider As IDBSchemaProviderEx
)

Parameters

NameTypeDescription
providerIDBSchemaProviderEx

A database schema provider that implements the IDBSchemaProviderEx interface.

|

Remarks

To use a custom database schema provider for SQL data sources, implement the IDBSchemaProviderEx interface. Pass an instance of the created class to the ASPxDashboard.SetDBSchemaProvider method to assign the provider to the Web Dashboard:

cs
// The ASPxDashboard1 variable is an instance of the ASPxDashboard class.
ASPxDashboard1.SetDBSchemaProvider(new CustomDBSchemaProvider());

For more information on custom database schema providers, refer to the following article: Implement a Custom Database Schema in ASP.NET Web Forms.

The following example shows how to implement a custom database schema provider:

View Example

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetDBSchemaProvider(IDBSchemaProviderEx) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

web-forms-dashboard-custom-database-schema-for-sql-data-sources/CS/WebFormsDashboard_CustomSchemaProvider/Default.aspx.cs#L16

csharp
// Uncomment one of the following lines depending on the provider.
ASPxDashboard1.SetDBSchemaProvider(new ManualDBSchemaProvider());
//ASPxDashboard1.SetDBSchemaProvider(new LimitDBSchemaProvider());

web-forms-dashboard-custom-database-schema-for-sql-data-sources/VB/WebFormsDashboard_CustomSchemaProvider/Default.aspx.vb#L15

vb
' Uncomment one of the following lines depending on the provider.
    ASPxDashboard1.SetDBSchemaProvider(New ManualDBSchemaProvider())
'ASPxDashboard1.SetDBSchemaProvider(new LimitDBSchemaProvider());

See Also

Implement a Custom Database Schema

Implement a Custom Database Schema in ASP.NET Web Forms

ASPxDashboard Class

ASPxDashboard Members

DevExpress.DashboardWeb Namespace