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

DashboardViewer.DashboardLoaded Event

Occurs after the dashboard is loaded to the DashboardViewer.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v18.2.Win.dll

Declaration

public event DashboardLoadedEventHandler DashboardLoaded

Event Data

The DashboardLoaded event's data class is DashboardLoadedEventArgs. The following properties provide information specific to this event:

Property Description
Dashboard Gets the loaded dashboard.

Remarks

The DashboardLoaded event is raised whenever a dashboard is loaded to the DashboardViewer.

Use the DashboardLoadedEventArgs.Dashboard event parameter to customize the dashboard before it is loaded to the DashboardViewer.

Example

The following example shows how to specify default parameter values on dashboard loading. To do this, handle the DashboardViewer.DashboardLoaded event, get access to the dashboard object using the DashboardLoadedEventArgs.Dashboard event parameter and specify the default value(s) using the Dashboard.Parameters[“parameterName”].Value property.

Imports System.Collections.Generic
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardWin
Imports DevExpress.DataAccess.ConnectionParameters

Namespace WinViewer_DefaultParameterValues
    Partial Public Class Form1
        Inherits DevExpress.XtraEditors.XtraForm

        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub dashboardViewer1_DashboardLoaded(ByVal sender As Object, ByVal e As DashboardLoadedEventArgs) _
            Handles dashboardViewer1.DashboardLoaded
            ' Specifies default parameter values.
            e.Dashboard.Parameters("customerIdParameter").Value = New List(Of String)() From {"ALFKI", "AROUT", "BONAP"}
        End Sub

        Private Sub dashboardViewer1_ConfigureDataConnection(ByVal sender As Object, _
                                                             ByVal e As DashboardConfigureDataConnectionEventArgs) _
                                                         Handles dashboardViewer1.ConfigureDataConnection
            If e.DataSourceName = "SQL Data Source 1" Then
                e.ConnectionParameters = New Access97ConnectionParameters("..\..\Data\nwind.mdb", "", "")
            End If
        End Sub
    End Class
End Namespace
See Also