Hi Ahmet,
We have checked your reported
query, and for more clarification, the Checkbox component TChecked property
supports only the bool type. Currently we don’t have support to set the int
type to the TChecked property of the checkbox component. For now, we can handle
the checkbox component checked property with an int type value. Refer to the
below code snippet.
<div class="form-group
col-md-3">
<label>Passive</label>
<SfCheckBox Checked="@(passive == 1 ? true : false)" TChecked="bool" ValueChange="OnChange"></SfCheckBox>
</div>
@code{
private int
passive = 1;
private void
OnChange(ChangeEventArgs<bool>
args)
{
passive =
args.Checked == true ? 1 : 0;
}
}
|
Based on passive integer value
(0 or 1), we can set the checked property of checkbox component and same time,
we can update the integer value using the ValueChange event of checkbox
component like above code snippet.
Kindly get back to us if you
need any further assistance on this.
Regards,
YuvanShankar A