DxEditorBase.BeginUpdate() Method
In This Article
Suspends component updates caused by parameter changes and method calls until the EndUpdate() method is called.
Namespace: DevExpress.Blazor.Base
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
public void BeginUpdate()
#Remarks
You can use BeginUpdate()
and EndUpdate() methods to change values of the editor parameters outside the component markup.
The following code snippet 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