Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseCheckedListBoxControl.SetItemCheckState(Int32, CheckState) Method

Sets the check state of the item.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public virtual void SetItemCheckState(
    int index,
    CheckState value
)

#Parameters

Name Type Description
index Int32

An integer value representing the zero-based index of the item.

value CheckState

A CheckState enumeration member specifying the new check state of the item.

#Remarks

Calling this method raises the BaseCheckedListBoxControl.ItemCheck event if the item’s check state has been changed. Note that an exception is raised if the index parameter is negative or exceeds the last available index.

You can also use the BaseCheckedListBoxControl.SetItemChecked method to change the state of an item to be checked or unchecked. If you need to obtain the item’s current state, use the BaseCheckedListBoxControl.GetItemCheckState or BaseCheckedListBoxControl.GetItemChecked methods.

If you need to change the item states of a databound BaseCheckedListBoxControl control during form loading, you need to call the BaseListBoxControl.ForceInitialize method beforehand.

See Also