Back to Devexpress

DataLoadingEventArgs.DataSourceComponentName Property

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

latest4.0 KB
Original Source

DataLoadingEventArgs.DataSourceComponentName Property

Get the component 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

Declaration

csharp
public string DataSourceComponentName { get; }
vb
Public ReadOnly Property DataSourceComponentName As String

Property Value

TypeDescription
String

A String that is the component name of the data source for which the event has been raised.

|

Remarks

Use the DataSourceComponentName 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 DataSourceComponentName 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-custom-items/CS/TutorialsCustomItems/Form1.cs#L22

csharp
private void DashboardDesigner1_DataLoading(object sender, DevExpress.DashboardCommon.DataLoadingEventArgs e){
    if (e.DataSourceComponentName == "dsExport")
        e.Data = CustomItemDataGenerator.GetExportData();

winforms-dashboard-add-custom-interactivity-to-dashboard/CS/Dashboard_CustomVisualInteractivity/Form1.cs#L65

csharp
private void dashboardViewer1_DataLoading(object sender, DataLoadingEventArgs e) {
    if (e.DataSourceComponentName == "dataSource1") {
        e.Data = nwindDataSet.SalesPerson;

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

vb
Private Sub DashboardDesigner1_DataLoading(ByVal sender As Object, ByVal e As DevExpress.DashboardCommon.DataLoadingEventArgs) Handles dashboardDesigner1.DataLoading
    If e.DataSourceComponentName = "dsExport" Then
        e.Data = CustomItemDataGenerator.GetExportData()

winforms-dashboard-add-custom-interactivity-to-dashboard/VB/Dashboard_CustomVisualInteractivity/Form1.vb#L61

vb
Private Sub dashboardViewer1_DataLoading(ByVal sender As Object, ByVal e As DataLoadingEventArgs)
    If e.DataSourceComponentName = "dataSource1" Then
        e.Data = nwindDataSet.SalesPerson

See Also

DataLoadingEventArgs Class

DataLoadingEventArgs Members

DevExpress.DashboardCommon Namespace