Back to Devexpress

DataLoadingEventArgs.Data Property

dashboard-devexpress-dot-dashboardcommon-dot-dataloadingeventargs.md

latest5.8 KB
Original Source

DataLoadingEventArgs.Data Property

Gets or sets data for the current data source.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public object Data { get; set; }
vb
Public Property Data As Object

Property Value

TypeDescription
Object

Data for the current data source.

|

Remarks

Use the Data property to supply data for the current data source. Note that an object assigned to the Data property should implement the IEnumerable or IListSource interface. Otherwise, the data source cannot read data.

To identify the data source for which the event is raised, use the DataId property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Data property.

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.

winforms-dashboard-replace-sql-data-source-with-object-data-source-with-filtered-data/CS/WinFormsDashboard/ViewerForm.cs#L64

csharp
}
    e.Data = dt;
}

winforms-dashboard-async-mode-designer-data-loading/CS/DashboardDesignerAsyncModeExample/Form1.cs#L23

csharp
if (!dashboardDesigner1.AsyncMode)
        e.Data = myData;
}

winforms-dashboard-custom-items/CS/TutorialsCustomItems/Form1.cs#L23

csharp
if (e.DataSourceComponentName == "dsExport")
    e.Data = CustomItemDataGenerator.GetExportData();
else if (e.DataSourceComponentName == "dsContinent")

DashboardDifferentUserDataAspNetCore/CS/Code/MultiTenantDashboardConfigurator.cs#L43

csharp
if (userName == "Admin") {
    e.Data = SalesData.GetSalesData();
} else if (userName == "User") {

DashboardDifferentUserDataMVC/CS/MVCDashboard/App_Start/DashboardConfig.cs#L37

csharp
if (userName == "Admin") {
    e.Data = SalesData.GetSalesData();
}

winforms-dashboard-replace-sql-data-source-with-object-data-source-with-filtered-data/VB/WinFormsDashboard/ViewerForm.vb#L67

vb
Next i
    e.Data = dt
Else

winforms-dashboard-async-mode-designer-data-loading/VB/DashboardDesignerAsyncModeExample/Form1.vb#L23

vb
If Not dashboardDesigner1.AsyncMode Then
    e.Data = myData
End If

winforms-dashboard-custom-items/VB/TutorialsCustomItems/Form1.vb#L19

vb
If e.DataSourceComponentName = "dsExport" Then
    e.Data = CustomItemDataGenerator.GetExportData()
ElseIf e.DataSourceComponentName = "dsContinent" Then

web-forms-dashboard-replace-sql-data-source-with-object-data-source-with-filtered-data/VB/ASPxDashboard/Default.aspx.vb#L39

vb
Next i
    e.Data = dt
Else

winforms-dashboard-designer-bind-a-dashboard-to-a-list-object/VB/Dashboard_BindingToList/Form1.vb#L23

vb
If ev.DataSourceName = "Data Source 1" Then
    ev.Data = Data.CreateData()
End If

See Also

DataLoadingEventArgs Class

DataLoadingEventArgs Members

DevExpress.DashboardCommon Namespace