Skip to content

ritazakhodyaeva/winforms-dashboard-recalculate-totals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for WinForms - How to Recalculate Totals when You Filter a Grid

The Dashboard does not fully support Grid column filters out of the box. These filters can only be used to select which data to show in the Grid item and they do not affect Total values calculated by the dashboard data engine. As a result, the Grid item shows filtered data when you apply grid column filters, but Totals are unchanged.

The example shows how to recalculate totals when when you apply column filters to the Grid dashboard item.

The example supports all the dashboard's Total types except for "Auto". If you apply the "Auto" total type in the dashboard, "Not Supported" is shown instead of the total value.

Example Overview

RecalculateGridTotalsModule

Implements the required functionality to recalculate Grid totals. The DashboardViewer.DashboardItemControlUpdated event allows you to access the underlying GridControl object and change its options. The GridView column's Summary is used to modify column totals in the underlying UI control.

The example also modifies Total values when you export data. The DashboardViewer.CustomExport event handler overrides the export procedure.

The module has the Attach and Detach public methods that allow you attach/detach it to/from your Dashboard Designer or Dashboard Viewer controls.

Helper classes

  • DashboardTotalsHelper is implemenented to get the underlying Grid Control's total type based on the Dashboard Grid item's total type.

  • FormatHelper allows you to format values using the dashboard's data items formatting settings.

Files to Look At

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages