I am trying to hide or show a div in the grid edit dialog by a change in the checked status of an SfCheckBox. This is to allow the user to enter additional data if the checkbox is checked. The div does not change hidden status until I click Save at which time the dialog closes.
<div class="form-group col-md-3">
<label class="e-float-text e-label-top">Uses Belts</label>
<SfCheckBox ID="UsesBelts" @bind-Checked="@rank.UsesBelts" @onchange="OnUsesBeltsChange"/>
</div>
<div hidden="@showBeltAttributes"> <!-- Belt configuration section -->
<div class="form-row">
<div class="form-group col-md-3">
<label class="e-float-text e-label-top">Belt</label>
<div><BECanvas Width="70" Height="70" @ref="_canvasReference"/></div>
</div>
</div>
...
private void OnUsesBeltsChange()
{
showBeltAttributes = !showBeltAttributes;
StateHasChanged();
}
Thank you