Skip to main content
A newer version of this page is available. .

DashboardViewer.UpdateExtractDataSourcesAsync(Action<String, ExtractUpdateResult>, Action<String, ExtractUpdateResult>) Method

Updates all extract data sources in the current dashboard asynchronously. Allows you to specify custom actions to perform after updating the data and file.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v20.1.Win.dll

NuGet Packages: DevExpress.Win.Dashboard, DevExpress.WindowsDesktop.Win.Dashboard

Declaration

public void UpdateExtractDataSourcesAsync(
    Action<string, ExtractUpdateResult> onDataUpdated,
    Action<string, ExtractUpdateResult> onFileUpdated
)

Parameters

Name Type Description
onDataUpdated Action<String, ExtractUpdateResult>

A custom action to perform when the data is updated.

onFileUpdated Action<String, ExtractUpdateResult>

A custom action to perform when the file is updated.

Example

The following code snippet implements the UpdateExtractAsync method that updates all extract files bound to the dashboard. It displays a message box and reloads DashboardViewer’s data when data is updated, and displays a message box when the extract files are updated.

delegate void SafeUpdate(string file);

private void UpdateExtractAsync()
{
    dashboardViewer1.UpdateExtractDataSourcesAsync((a, b) => { OnDataReady(a); }, (a, __) => { MessageBox.Show($"File {a} updated "); });
}

void OnDataReady(string fileName)
{
    dashboardViewer1.Invoke(new SafeUpdate(UpdateViewer), new object[] { fileName });
}

void UpdateViewer(string fileName)
{
    MessageBox.Show($"Data for the file {fileName} is ready ");
    dashboardViewer1.ReloadData();
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the UpdateExtractDataSourcesAsync(Action<String, ExtractUpdateResult>, Action<String, ExtractUpdateResult>) method.

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.

See Also