property Items.CellHasRadioButton(Index as Long, ColIndex as Variant) as Boolean
Retrieves or sets a value indicating whether the cell has associated a radio button.

TypeDescription
Index as Long A long expression that specifies the index of item.
ColIndex as Variant A long expression that specifies the index of column, a string expression that identifies the column's caption or column's key.
Boolean A boolean expression that specifies whether the cell contains radio button.
Retrieves or sets a value indicating whether the cell has associated a radio button or not. To change the state for a radio cell you have to use CellState property. The cell cannot display in the same time a radio and a check button. The control fires CellStateChanged event when the cell's state has been changed. To set the cell of check type you have call CellHasCheckBox property. To add or remove a cell to a given radio group you have to use CellRadioGroup property. Use the Def property to assign radio buttons for all cells in the column. Use the CellImage property to add a single icon to a cell. Use the CellImages property to assign multiple icons to a cell. Use the CellPicture property to load a custom size picture to a cell. Use the RadioImage property to change the radio button appearance.

The following VB sample enumerates all the cells in the first column and groups all of them in the same radio:

Dim h As Variant
List1.BeginUpdate
    With List1.Items
        For Each h In List1.Items
            .CellHasRadioButton(h, 0) = True
            .CellRadioGroup(h, 0) = 1234
        Next
    End With
List1.EndUpdate
or

Dim h As Variant
With List1
    .BeginUpdate
    .Columns(0).Def(exCellHasRadioButton) = True
    With List1.Items
        For Each h In List1.Items
            .CellRadioGroup(h, 0) = 1234
        Next
    End With
    .EndUpdate
End With

The following VB sample assigns a radio button to the focused cell:

With List1.Items
    .CellHasRadioButton(.FocusItem, 0) = True
    .CellRadioGroup(.FocusItem, 0) = 1234
End With

The following C++ sample assigns a radio button to the focused cell:

#include "Items.h"
CItems items = m_list.GetItems();
items.SetCellHasRadioButton( items.GetFocusItem(), COleVariant( (long)0 ), TRUE );
items.SetCellRadioGroup( items.GetFocusItem(), COleVariant( (long)0 ), 1234 );

The following VB.NET sample assigns a radio button to the focused cell:

With AxList1.Items
    .CellHasRadioButton(.FocusItem, 0) = True
    .CellRadioGroup(.FocusItem, 0) = 1234
End With

The following C# sample assigns a radio button to the focused cell:

axList1.Items.set_CellHasRadioButton(axList1.Items.FocusItem, 0, true);
axList1.Items.set_CellRadioGroup(axList1.Items.FocusItem, 0, 1234);

The following VFP sample assigns a radio button to the focused cell:

with thisform.List1.Items
	.CellHasRadioButton(.FocusItem,0) = .t.
	.CellRadioGroup(.FocusItem,0) = 1234
endwith