dashboard-devexpress-dot-dashboardcommon-dot-dataloadingeventargs-dc380830.md
Gets the name of the data source for which the event has been raised.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public string DataSourceName { get; }
Public ReadOnly Property DataSourceName As String
| Type | Description |
|---|---|
| String |
A String that is the name of the data source for which the event has been raised.
|
Use the DataSourceName property to identify the data source for which the event is raised.
To provide data, use the DataLoadingEventArgs.Data property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DataSourceName 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.
dashboardViewer1.DataLoading += (s, ev) => {
if (ev.DataSourceName == "Data Source 1")
ev.Data = Data.CreateData();
private void DashboardViewer1_DataLoading(object sender, DataLoadingEventArgs e) {
if (e.DataSourceName == "EnergyConsumptionBySector") {
e.Data = GetData(dataFileName);
asp-net-core-dashboard-export-all-items/CS/AspNetCoreDashboard_ExportAllItems/Startup.cs#L66
configurator.DataLoading += (s, e) => {
if(e.DataSourceName == "Object Data Source") {
e.Data = Invoices.CreateData();
wpf-dashboard-how-to-bind-to-object-list/CS/WpfDashboard_ObjectDataSource/MainWindow.xaml.cs#L23
{
if (e.DataSourceName == "MyDataSource")
e.Data = Data.CreateData();
AddHandler dashboardViewer1.DataLoading, Sub(s, ev)
If ev.DataSourceName = "Data Source 1" Then
ev.Data = Data.CreateData()
Private Sub DashboardViewer1_DataLoading(ByVal sender As Object, ByVal e As DataLoadingEventArgs)
If e.DataSourceName = "EnergyConsumptionBySector" Then
e.Data = GetData(dataFileName)
wpf-dashboard-how-to-bind-to-object-list/VB/WpfDashboard_ObjectDataSource/MainWindow.xaml.vb#L22
Private Sub dashboardControl_AsyncDataLoading(ByVal sender As Object, ByVal e As DataLoadingEventArgs)
If Equals(e.DataSourceName, "MyDataSource") Then e.Data = Data.CreateData()
End Sub
See Also