| layout | post |
|---|---|
| title | CheckBoxAdv Settings in Windows Forms CheckBox control | Syncfusion® |
| description | Learn about CheckBoxAdv Settings support in Syncfusion® Windows Forms CheckBox (CheckBoxAdv) control and more details. |
| platform | windowsforms |
| control | EditorsPackage |
| documentation | ug |
This section discusses the various states of the CheckBoxAdv control and the method of associating values with the states.
The CheckBoxAdv states can be changed by using CheckState or Checked property.
| CheckBoxAdv Property | Description |
|---|---|
| CheckState | Gets or sets the check state of the CheckBox. It includes Unchecked,Checked and Indeterminate options. |
| Checked | Gets or sets the checked state of the CheckBox. |
{% tabs %} {% highlight c# %}
this.checkBoxAdv1.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxAdv1.Checked = true;
{% endhighlight %}
{% highlight vb %}
Me.checkBoxAdv1.CheckState = System.Windows.Forms.CheckState.Checked Me.checkBoxAdv1.Checked = True
{% endhighlight %} {% endtabs %}
{% seealso %}
{% endseealso %}
You can customize the values associated with the various check states of CheckBoxAdv control. Both integer and string values can be associated with the check states.
| CheckBoxAdv Properties | Description |
|---|---|
| CheckedInt | Specifies the integer value when checked. |
| CheckedString | Specifies the string value when checked. |
| IndeterminateInt | Specifies the integer value when indeterminate. |
| IndeterminateString | Specifies the string value when indeterminate. |
| UncheckedInt | Specifies the integer value when Unchecked. |
| UncheckedString | Specifies the string value when Unchecked. |
| StringValue | Gets or sets the string value. |
| BoolValue | Gets or sets a value indicating the check state. This property can be set to use bool values for data binding. Refer {{'[Frequently Asked Questions section](https://help.syncfusion.com/windowsforms/checkbox/faq/how-to-databind-a-checkboxadv-to-an-sql-database-if-the-corresponding-datatable-field-is-boolean)' | markdownify }}. |
| IntValue | Gets or sets the int value. Refer {{'[Frequently Asked Questions section](https://help.syncfusion.com/windowsforms/checkbox/faq/how-to-databind-a-checkboxadv-to-an-sql-database-if-the-corresponding-datatable-field-is-a-bit-field)' | markdownify }} |
{% tabs %} {% highlight c# %}
this.checkBoxAdv1.CheckedInt = 3; this.checkBoxAdv1.CheckedString = "CheckBoxAdv is Checked"; this.checkBoxAdv1.IndeterminateInt = 5; this.checkBoxAdv1.IndeterminateString = "CheckBoxAdv is Indeterminate";
this.checkBoxAdv1.UncheckedInt = 3; this.checkBoxAdv1.UncheckedString = "CheckBoxAdv is Unchecked"; this.checkBoxAdv1.StringValue = "String"; this.checkBoxAdv1.IntValue = 5; this.checkBoxAdv1.BoolValue = true;
{% endhighlight %}
{% highlight vb %}
Me.checkBoxAdv1.CheckedInt = 3 Me.checkBoxAdv1.CheckedString = "CheckBoxAdv is Checked" Me.checkBoxAdv1.IndeterminateInt = 5 Me.checkBoxAdv1.IndeterminateString = "CheckBoxAdv is Indeterminate"
Me.checkBoxAdv1.UncheckedInt = 3 Me.checkBoxAdv1.UncheckedString = "CheckBoxAdv is Unchecked" Me.checkBoxAdv1.StringValue = "String" Me.checkBoxAdv1.IntValue = 5 Me.checkBoxAdv1.BoolValue = True
{% endhighlight %} {% endtabs %}
