property Items.CellState(Index as Long, ColIndex as Variant) as Long
Retrieves or sets the cell's state.

TypeDescription
Index as Long A long expression that indicates the index of the item.
ColIndex as Variant A long expression that indicates the column's index, or a string expression that indicates the column's caption or column's key.
Long A long value that indicates the cell's state. 0 - Unchecked, 1 - Checked, ( 2 - Partial Checked, only for cells of check type ).

Use the CellState property to change the cell's state. The CellState property has effect only for check and radio cells. Use the CellHasCheckBox property to assign a check box to a cell. Use the CellHasRadioButton property to add a radio button to a cell. The control fires the CellStateChanged event when user changes the cell's state. Use the CheckImage property to change the check box appearance. Use the RadioImage property to change the radio button appearance. Use the FilterType property on exCheck to filter for checked or unchecked items.

The following VB sample adds a check box that's checked to the focused cell:

With List1.Items
    .CellHasCheckBox(.FocusItem, 0) = True
    .CellState(.FocusItem, 0) = 1
End With

The following C++ sample adds a check box that's checked to the focused cell:

#include "Items.h"
CItems items = m_list.GetItems();
COleVariant vtColumn( long(0) );
long nItem = items.GetFocusItem();
items.SetCellHasCheckBox( nItem, vtColumn, TRUE );
items.SetCellState( nItem, vtColumn, 1 );

The following VB.NET sample adds a check box that's checked to the focused cell:

With AxList1.Items
    .CellHasCheckBox(.FocusItem, 0) = True
    .CellState(.FocusItem, 0) = 1
End With

The following C# sample adds a check box that's checked to the focused cell:

axList1.Items.set_CellHasCheckBox(axList1.Items.FocusItem, 0, true);
axList1.Items.set_CellState(axList1.Items.FocusItem, 0, 1);

The following VFP sample adds a check box that's checked to the focused cell:

with thisform.List1.Items
	.CellHasCheckBox( .FocusItem, 0 ) = .t.
	.CellState( .FocusItem,0 ) = 1
endwith