Skip to main content

BaseCheckedListBoxControl.SetItemChecked(Int32, Boolean) Method

Sets the specified item’s state to checked or unchecked.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual void SetItemChecked(
    int index,
    bool value
)

Parameters

Name Type Description
index Int32

An integer value that specifies the zero-based index of the item whose check state should be changed.

value Boolean

true, if the item is checked; false, if the item is unchecked.

Remarks

Use the SetItemChecked method to set an item’s state to checked or unchecked. The ItemCheck event raises if the state is changed.

To set an item’s check state before the form is loaded, call the ForceInitialize method before the SetItemChecked method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetItemChecked(Int32, Boolean) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also