Your search did not match any results.

Check Box


When you add a CheckBox to an application, set its value property. The CheckBox can have the following states:

  • Checked (value is true).
  • Unchecked (value is false).
  • Undetermined (value is undefined).

Set the onValueChanged property to handle the value change. In this demo, the value of the "Handle value change" CheckBox is passed to the "Disabled" CheckBox. Click the first CheckBox to see how it affects the second one.

You can use the iconSize property to specify a custom width and height for the CheckBox. To add a label to the CheckBox, set the text property.

Backend API
<div class="form"> <div class="dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Checked</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(true) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Unchecked</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(false) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Indeterminate</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(null) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Handle value change</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(null) .OnValueChanged("checkBox_valueChanged") ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Disabled</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .ID("disabled") .Value(null) .Disabled(true) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Custom size</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(null) .IconSize(30) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">With label</div> <div class="dx-field-value"> @(Html.DevExtreme().CheckBox() .Value(true) .Text("Label") ) </div> </div> </div> </div> <script> function checkBox_valueChanged(data) { $("#disabled").dxCheckBox("instance").option("value", data.value); } </script>
using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class CheckBoxController : Controller { public ActionResult Overview() { return View(); } } }