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.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[DefaultValue(false)]
[DXCategory("Behavior")]
public virtual bool AllowGrayed { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | false | 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.