The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxDashboard.DataLoading Event

Allows you to provide data for the DashboardObjectDataSource.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v18.2.Web.WebForms.dll

Declaration

public event DataLoadingWebEventHandler DataLoading
Public Event DataLoading As DataLoadingWebEventHandler

Event Data

The DataLoading event handler receives an argument of the DataLoadingWebEventArgs type. The following properties provide information specific to this event.

Property Description
DashboardId Gets the identifier of the current dashboard.
Data Gets or sets data for the current data source.
DataSourceComponentName Get the component name of the data source for which the event has been raised.
DataSourceName Gets the name of the data source for which the event has been raised.
Parameters Provides access to parameter values passed to the object data source.

Remarks

The DataLoading event is raised when the dashboard needs to load data from a data source assigned using the DashboardObjectDataSource. Use the event parameter's DataLoadingEventArgs.Data property to provide data for this data source. This object should implement the IEnumerable or IListSource interface.

For other data source types (for instance, DashboardSqlDataSource or DashboardOlapDataSource), you can handle the ASPxDashboard.ConfigureDataConnection event to customize connection parameters.

Examples

In this example, the ObjectDataSource.DataSource property specifies the type of a data class. The actual data for this data source is provided by handling the ASPxDashboard.DataLoading event.

Imports System

Namespace WebDesigner_DataLoading
        Public Class Global_asax
            Inherits System.Web.HttpApplication

            Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
                AddHandler DevExpress.Web.ASPxWebControl.CallbackError, AddressOf Application_Error
            End Sub

            Private Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
                ' Code that runs on application shutdown
            End Sub

            Private Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
                ' Code that runs when an unhandled error occurs
            End Sub

            Private Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
                ' Code that runs when a new session is started
            End Sub

            Private Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
                ' Code that runs when a session ends. 
                ' Note: The Session_End event is raised only when the sessionstate mode
                ' is set to InProc in the Web.config file. If session mode is set to StateServer 
                ' or SQLServer, the event is not raised.
            End Sub
        End Class
End Namespace
See Also