All docs
V21.1
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DashboardExtractDataSource.UpdateFile(DashboardExtractDataSource, Action<String, ExtractUpdateResult>, Action<String, ExtractUpdateResult>) Method

Static method to update data in the data extract file. Allows you to prevent access to the file until the data is refreshed and the file is re-created.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v21.1.Core.dll

Declaration

public static void UpdateFile(
    DashboardExtractDataSource dataSource,
    Action<string, ExtractUpdateResult> onDataUpdated,
    Action<string, ExtractUpdateResult> onFileUpdated
)

Parameters

Name Type Description
dataSource DashboardExtractDataSource

A DashboardExtractDataSource instance that is the data source to update.

onDataUpdated Action<String, ExtractUpdateResult>

A Action delegate that specifies the action to perform when the data is updated.

onFileUpdated Action<String, ExtractUpdateResult>

A Action delegate that specifies the action to perform when the file is re-created.

Example

This example demonstrates how to refresh the data contained in the Extract Data Source in web application.

View Example: How to use DashboardExtractDataSource in the ASPxDashboard control

To update the data extract file, an AJAX request is sent to the server and calls the server-side DashboardExtractDataSource.UpdateFile method. When the data is updated and a new extract file is created on the server, the callback returns to the client and calls the ASPxClientDashboard.Refresh method to load new data:

function UpdateExtractDataSource() {
    $.ajax({
        url: "Default.aspx/UpdateExtractDataSource",
        type: "POST",
        data: {},
        contentType: "application/json; charset=utf-8"
    }).done(function (result) {
        dashboard.ReloadData();
    });
}
See Also