Back to Devexpress

BaseCheckedListBoxControl.AllowGrayed Property

windowsforms-devexpress-dot-xtraeditors-dot-basecheckedlistboxcontrol-9599b975.md

latest2.9 KB
Original Source

BaseCheckedListBoxControl.AllowGrayed Property

Gets or sets whether check items in the checked list box should support three check states rather than two.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Behavior")]
public virtual bool AllowGrayed { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(False)>
Public Overridable Property AllowGrayed As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the check items are able to display three check states; otherwise, false.

|

Remarks

Use the AllowGrayed property to determine whether check items in the BaseCheckedListBoxControl control support two or three check states.

If this property is set to false , only two states - Unchecked and Checked are available. You can use the BaseCheckedListBoxControl.GetItemChecked method to get or set the check state of a check item in this case.

If the AllowGrayed property is true , check items can be in one of three check states: Unchecked, Checked and Indeterminate. In the indeterminate (also called “grayed”) state, a check box is displayed with a dimmed appearance to indicate that the option is unavailable. The check state of items can be obtained via the BaseCheckedListBoxControl.GetItemCheckState method in this case.

To toggle check states in code, use the BaseCheckedListBoxControl.ToggleItem method.

See Also

GetItemChecked(Int32)

GetItemCheckState(Int32)

ToggleItem(Int32)

BaseCheckedListBoxControl Class

BaseCheckedListBoxControl Members

DevExpress.XtraEditors Namespace