Skip to content

DevExpress-Examples/web-forms-dashboard-replace-sql-data-source-with-object-data-source-with-filtered-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for Web Forms - How to replace DashboardSqlDataSource with DashboardObjectDataSource with filtered data

DashboardSqlDataSource allows requesting data in two ways:
1. Direct database connection: Server Mode.
2. In-memory data processing: Client Mode.

The first approach works if you configure the data source using the Query Builder. In this case, it is possible to add a custom filter expression to filter requested data using the CustomFilterExpression event.
If you load data using a custom SQL query or a stored procedure, only Client Data Processing Mode is supported. This example demonstrates how to filter data requested from a database manually and pass it to a dashboard as DashboardObjectDataSource.
To accomplish this task it is necessary to define a custom DashboardStorage class and implement the LoadDashboard method to update loaded dashboards and replace the target DashboardSqlDataSource queries with new DashboardObjectDataSources.
Then, handle the DataLoading event to provide data to the new object data sources. To learn how to request data using DashboardSqlDataSource, refer to the T347509: How to get data from the Dashboard DataSource and convert it to DataTable thread. 

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)