DashboardViewer.DashboardLoaded Event
Occurs after the dashboard is loaded to the DashboardViewer.
Namespace: DevExpress.DashboardWin
Assembly: DevExpress.Dashboard.v19.1.Win.dll
Declaration
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-specify-default-parameter-values-in-the-winforms-viewer-t475858.
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
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the DashboardLoaded event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.