windowsforms-devexpress-dot-xtraeditors-dot-controls-1a61719b.md
Represents a single item in the collection.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public class RadioGroupItem :
ICloneable
Public Class RadioGroupItem
Implements ICloneable
The following members return RadioGroupItem objects:
This class represents a single item displayed in the radio group control. The collection is represented by the RadioGroupItemCollection object.
The RadioGroupItem.Description property specifies the item caption. The item’s value is specified by the RadioGroupItem.Value property.
Individual items can be accessed via the collection’s RadioGroupItemCollection.Item property using index notation.
The following code shows how to add items to a RadioGroup and then select one of the items. To select an item, the item’s value is assigned to the editor’s BaseEdit.EditValue property.
using DevExpress.XtraEditors.Controls;
// Create five items.
object[] itemValues = new object[] {10, 11, 12, 13, 14};
string [] itemDescriptions = new string [] {"Circle", "Rectangle", "Ellipse", "Triangle", "Square"};
for(int i = 0; i < itemValues.Length; i++) {
radioGroup1.Properties.Items.Add(new RadioGroupItem(itemValues[i], itemDescriptions[i]));
}
//Select the Rectangle item.
radioGroup1.EditValue = 11;
Imports DevExpress.XtraEditors.Controls
' Create five items.
Dim itemValues As Object() = New Object() {10, 11, 12, 13, 14}
Dim itemDescriptions As String() = New String () {"Circle", "Rectangle", "Ellipse", "Triangle", "Square"}
Dim i As Integer = 0
Do While i < itemValues.Length
radioGroup1.Properties.Items.Add(New RadioGroupItem(itemValues(i), itemDescriptions(i)))
i += 1
Loop
'Select the Rectangle item.
radioGroup1.EditValue = 11
Object RadioGroupItem
See Also