ASPxDashboard.DataLoading Event
Allows you to provide data for the DashboardObjectDataSource.
Namespace: DevExpress.DashboardWeb
Assembly: DevExpress.Dashboard.v24.2.Web.WebForms.dll
NuGet Package: DevExpress.Web.Dashboard
#Declaration
public event DataLoadingWebEventHandler DataLoading
#Event Data
The DataLoading event's data class is DataLoadingWebEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Dashboard |
Gets the identifier of the current dashboard. |
Data |
Gets or sets data for the current data source.
Inherited from Data |
Data |
Gets an object data source’s unique identifier.
Inherited from Data |
Data |
Get the component name of the data source for which the event has been raised.
Inherited from Data |
Data |
Gets the name of the data source for which the event has been raised.
Inherited from Data |
Overwrite |
Specifies whether the Data |
Parameters |
Provides access to parameter values passed to the object data source.
Inherited from Data |
#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.
#Example
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.
- Default.aspx.cs
- SalesPersonData.cs
- Default.aspx.vb
- SalesPersonData.vb
- Default.aspx (C#)
- Default.aspx (VB.NET)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebDesigner_DataLoading.Default" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div style="position: absolute; left: 0; right: 0; top:0; bottom:0;">
<dx:ASPxDashboard ID="ASPxDashboard1" runat="server" Width="100%" Height="100%"
ondataloading="ASPxDashboard1_DataLoading">
</dx:ASPxDashboard>
</div>
</form>
</body>
</html>
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DataLoading 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.