Skip to main content
All docs
V23.2

DxListBox<TData, TValue>.EndUpdate() Method

Resumes List Box updates (when the BeginUpdate() method pauses updates) and re-renders the List Box.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public void EndUpdate()

Remarks

You can use BeginUpdate() and EndUpdate() methods to change values of the List Box parameters outside the component markup.

The code below changes the ReadOnly parameter value.

<DxListBox Data="forecasts"
           TextFieldName="@nameof(WeatherForecast.Summary)"
           @ref="component"
           @bind-Values="values"/>
<br/>
<DxButton Text="MakeReadOnly" Click="@MakeReadOnly"></DxButton>

@code {
    private IListBox<WeatherForecast, WeatherForecast> component;

    private IEnumerable<WeatherForecast> forecasts;
    private IEnumerable<WeatherForecast> values;

    protected override async Task OnInitializedAsync() {
        forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
    }

    void MakeReadOnly() {
        component.BeginUpdate();
        component.ReadOnly = true;
        component.EndUpdate();
    }
}

Implements

See Also