Back to Devexpress

DashboardControl.AsyncDataLoading Event

dashboard-devexpress-dot-dashboardwpf-dot-dashboardcontrol-a69197ab.md

latest4.5 KB
Original Source

DashboardControl.AsyncDataLoading Event

Allows you to provide data for the DashboardObjectDataSource.

Namespace : DevExpress.DashboardWpf

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

NuGet Package : DevExpress.Wpf.Dashboard

Declaration

csharp
public event DataLoadingEventHandler AsyncDataLoading
vb
Public Event AsyncDataLoading As DataLoadingEventHandler

Event Data

The AsyncDataLoading event's data class is DataLoadingEventArgs. The following properties provide information specific to this event:

PropertyDescription
DataGets or sets data for the current data source.
DataIdGets an object data source’s unique identifier.
DataSourceComponentNameGet the component name of the data source for which the event has been raised.
DataSourceNameGets the name of the data source for which the event has been raised.
OverwriteDataSourcePropertySpecifies whether the DataSource and DataMember properties of the DashboardObjectDataSource are set when data is supplied in the event handler.
ParametersProvides access to parameter values passed to the object data source.

Remarks

The AsyncDataLoading 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 DashboardControl.ConfigureDataConnection event to customize connection parameters.

Note

You cannot access a control’s properties such as the DashboardControl.Dashboard property through the AsyncDataLoading event because it receives data asynchronously from a background thread.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AsyncDataLoading 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.

wpf-dashboard-how-to-bind-to-object-list/CS/WpfDashboard_ObjectDataSource/MainWindow.xaml#L26

xml
MinHeight="150"
    AsyncDataLoading="dashboardControl_AsyncDataLoading" Grid.Row="1"/>
<dx:SimpleButton x:Name="simpleButton" Content="Reload Data" Grid.Row="0" Click="simpleButton_Click"/> </Grid>

See Also

DashboardControl Class

DashboardControl Members

DevExpress.DashboardWpf Namespace