Skip to main content

DxDataGrid<T>.Refresh() Method

Reloads data and redraws the Data Grid component.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public Task Refresh()


Type Description

An asynchronous operation that reloads the visible data items and applies changes to the UI.



The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

Use the Refresh method to synchronize visible data rows with the latest version of your data source, for example, data from a remote server. This method forces data binding operations and applies the returned version of data source to the Data Grid component.

The code below refreshes the Data Grid when a user clicks the Refresh button:

<DxButton Text="Refresh" Click="@OnRefreshBtnClick" />
<DxDataGrid ... @ref="@_gridRef">
    @* ... *@
@code {
    DxDataGrid<WebApiOrder> _gridRef;
    protected async Task OnRefreshBtnClick(MouseEventArgs args) {
        await _gridRef.Refresh();

The Refresh method does not redraw the rows when there are no changes. In this case, use the StateHasChanged method to re-render the Data Grid, for example, to update templates:

<DxButton Text="Change State" Click="@OnBtnClick" />
<DxDataGrid Data="@forecasts">
        @* ... *@

@code {
    private WeatherForecast[] forecasts;
    @* ... *@
    protected void OnBtnClick(MouseEventArgs args) {

Run Demo: Data Grid - Data Binding

See Also