# CheckedListBox

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (2.5.0.0)

* [Control](/api/v2.5/wisej.web/general/control.md)
  * [ListControl](/api/v2.5/wisej.web/lists-and-grids/listcontrol.md)
    * [ListBox](/api/v2.5/wisej.web/lists-and-grids/wisej.web.listbox.md)
      * [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md)

Displays a [ListBox](/api/v2.5/wisej.web/lists-and-grids/wisej.web.listbox.md) in which a check box is displayed to the left of each item.

{% tabs %}
{% tab title="C#" %}

```csharp
public class CheckedListBox : ListBox
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class CheckedListBox
    Inherits ListBox
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckedListBox()

Initializes a new instance of the [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md) class.

## Properties

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckedIndices

[CheckedIndexCollection](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md): Collection of checked indexes in this [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md).

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckedItems

[CheckedObjectCollection](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md): Collection of checked items in this [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md).

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckOnClick

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether list items are checked when they are clicked. The default is to check the item when clicking on the checkbox icon.

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckStateMember

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the property to use as the tooltip for the items in the [ListControl](/api/v2.5/wisej.web/lists-and-grids/listcontrol.md), when the property [ShowToolTips](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md) is set to true.

### ![](/files/-MTRl851gGvQXMvSEG1f)Items

[ObjectCollection](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md): Returns the collection of items in this [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md).

## Methods

### ![](/files/-MTRl851gGvQXMvSEG1f)ClearChecked()

Unchecks all items in the [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md).

### ![](/files/-MTRl851gGvQXMvSEG1f)GetItemChecked(index)

Returns a value indicating whether the specified item is checked.

| Parameter | Type                                                              | Description            |
| --------- | ----------------------------------------------------------------- | ---------------------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The index of the item. |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). true if the item is checked; otherwise, false.

**Throws:**

* [ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception) The *index* specified is less than zero; or the *index* specified is greater than or equal to the count of items in the list.

### ![](/files/-MTRl851gGvQXMvSEG1f)GetItemCheckState(index)

Returns a value indicating the check state of the current item.

| Parameter | Type                                                              | Description                                        |
| --------- | ----------------------------------------------------------------- | -------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) | The index of the item to get the checked value of. |

**Returns:** [CheckState](/api/v2.5/wisej.web/enumerations/wisej.web.checkstate.md). One of the [CheckState](/api/v2.5/wisej.web/enumerations/wisej.web.checkstate.md) values.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The *index* specified is less than zero; or the *index* specified is greater than or equal to the count of items in the list.

### ![](/files/-MTRl851gGvQXMvSEG1f)SetItemChecked(index, value)

Sets [CheckState](/api/v2.5/wisej.web/enumerations/wisej.web.checkstate.md) for the item at the specified index to Checked.

| Parameter | Type                                                                  | Description                                        |
| --------- | --------------------------------------------------------------------- | -------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)     | The index of the item to set the check state for.  |
| **value** | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) | true to set the item as checked; otherwise, false. |

**Throws:**

* [ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception) The index specified is less than zero; or the index is greater than the count of items in the list.

### ![](/files/-MTRl851gGvQXMvSEG1f)SetItemCheckState(index, value)

Sets the check state of the item at the specified index.

| Parameter | Type                                                                   | Description                                                                               |
| --------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)      | The index of the item to set the state for.                                               |
| **value** | [CheckState](/api/v2.5/wisej.web/enumerations/wisej.web.checkstate.md) | One of the [CheckState](/api/v2.5/wisej.web/enumerations/wisej.web.checkstate.md) values. |

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The *index* specified is less than zero; or the *index* is greater than or equal to the count of items in the list.

## Events

### ![](/files/-MTRl851gGvQXMvSEG1f)AfterItemCheck

[ItemCheckEventHandler](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox/wisej.web.itemcheckeventhandler.md) Fired after the checked state of an item changes.

### ![](/files/-MTRl851gGvQXMvSEG1f)CheckStateMemberChanged

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the [CheckStateMember](/api/v2.5/wisej.web/lists-and-grids/listcontrol.md#checkstatemember) property changes.

### ![](/files/-MTRl851gGvQXMvSEG1f)Click

[EventHandler](https://docs.microsoft.com/en-us/dotnet/api/system.eventhandler) Fired when the user clicks the [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md) control.

### ![](/files/-MTRl851gGvQXMvSEG1f)ItemCheck

[ItemCheckEventHandler](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox/wisej.web.itemcheckeventhandler.md) Fired when the checked state of an item changes.

### ![](/files/-MTRl851gGvQXMvSEG1f)MouseClick

[MouseEventHandler](/api/v2.5/wisej.web/general/control/wisej.web.mouseeventhandler.md) Fired when the user clicks the [CheckedListBox](/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md) control with the mouse.

## Implements

| Name                                                                                   | Description                                                                                                                |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](/api/v2.5/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                              |
| [IWisejComponent](/api/v2.5/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                             |
| [IWisejControl](/api/v2.5/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/v2.5/wisej.web/general/control.md) class must implement this interface. |
| [IWisejSerializable](/api/v2.5/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/v2.5/wisej.web/lists-and-grids/checkedlistbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
