Skip to content

DevExpress-Examples/winforms-dashboard-custom-database-schema-for-sql-data-sources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for WinForms - How to customize a database schema for SQL data sources

This example shows how to create a custom database schema for the dashboard. The example contains two implementation of the IDBSchemaProviderEx interface, LimitDBSchemaProvider and ManualDBSchemaProvider. Use the DashboardDesigner.CustomDBSchemaProviderEx property to specify a custom database schema provider for SQL Data Sources.

To see the result, add a new query or edit the existing query. The Query Builder window contains only fields and tables that the custom database schema provider supplies.

The LimitDBSchemaProvider class

File: LimitDBSchemaProvider.cs (VB: LimitDBSchemaProvider.vb)

This provider displays only the following database entities:

  • Tables which names start with the letter C
  • Views which names start with Order
  • Stored procedures with zero arguments

The ManualDBSchemaProvider class

File: ManualDBSchemaProvider.cs (VB: ManualDBSchemaProvider.vb)

This provider loads two tables (Categories and Products) for the nwind.mdb database connection. . Both tables contain only two columns and the tables are linked by the CategoryID field.

This technique improves the Data Source Wizard performance when loading the database schema to the dashboard.

Files to Review

Documentation

More Examples