Dashboard for WinForms - How to Replace the Dashboard Sql Data Source with the Dashboard Object Data Source
The DashboardSqlDataSource has two modes for data retrieval:
- Direct database connection (Server mode)
- In-memory data processing (Client mode)
The first approach works if you configure the data source with the Query Builder. You can handle the CustomFilterExpression event to filter data.
If you use a custom SQL query or a stored procedure, only Client Data Processing Mode is available. This example demonstrates how to get data from a database. filter the data in code and pass it to the DashboardObjectDataSource.
To accomplish this task, handle the DashboardLoaded event and replace SQL queries with a new DashboardObjectDataSource. Subsequently handle the DataLoading event to provide data to the new object data source.
- ViewerForm.cs (VB: ViewerForm.vb)
(you will be redirected to DevExpress.com to submit your response)