Skip to main content
A newer version of this page is available. .

How to: Access the Dashboard Control

  • 3 minutes to read

This topic describes how to access the DashboardViewer control in a WinForms application and the ASPxDashboard control in an ASP.NET application.



Before you proceed, ensure that:

  • your WinForms module project references the DevExpress.Dashboard.v20.2.Win.dll and DevExpress.ExpressApp.Dashboards.Win.v20.2.dll assemblies;
  • your ASP.NET module project references the DevExpress.Dashboard.v20.2.Web.dll and DevExpress.ExpressApp.Dashboards.Web.v20.2.dll assemblies.

Follow these steps in WinForms and ASP.NET module projects to access the dashboard control:

using System;
using DevExpress.DashboardWin;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Dashboards.Win;
using DevExpress.Persistent.Base;
// ...
public class WinDashboardController : ObjectViewController<DetailView, IDashboardData> {
    private WinDashboardViewerViewItem dashboardViewerViewItem;
    protected override void OnActivated() {
        dashboardViewerViewItem = View.FindItem("DashboardViewer") as WinDashboardViewerViewItem;
        if(dashboardViewerViewItem != null) {
            if(dashboardViewerViewItem.Viewer != null) {
            else {
                dashboardViewerViewItem.ControlCreated += DashboardViewerViewItem_ControlCreated;
    private void DashboardViewerViewItem_ControlCreated(object sender, EventArgs e) {
    private void CustomizeDashboardViewer(DashboardViewer dashboardViewer) {
        dashboardViewer.AllowPrintDashboardItems = true;
    protected override void OnDeactivated() {
        if(dashboardViewerViewItem != null) {
            dashboardViewerViewItem.ControlCreated -= DashboardViewerViewItem_ControlCreated;
            dashboardViewerViewItem = null;