Back to Devexpress

RepositoryItemRadioGroup Class

windowsforms-devexpress-dot-xtraeditors-dot-repository-5f49e0f4.md

latest3.9 KB
Original Source

RepositoryItemRadioGroup Class

Represents a repository item which stores settings specific to RadioGroup controls.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public class RepositoryItemRadioGroup :
    RepositoryItem,
    ISupportAutoHeight
vb
Public Class RepositoryItemRadioGroup
    Inherits RepositoryItem
    Implements ISupportAutoHeight

The following members return RepositoryItemRadioGroup objects:

Remarks

The RepositoryItemRadioGroup class provides properties and events specific to RadioGroup controls. You can access these settings via the editor’s RadioGroup.Properties property.

The main settings provided by the RadioGroup class include:

You only need to create standalone repository items to provide inplace editors for container controls.

Example

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.

csharp
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;
vb
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

Inheritance

Object MarshalByRefObject Component DevExpress.XtraEditors.ComponentBase RepositoryItem RepositoryItemRadioGroup

See Also

RepositoryItemRadioGroup Members

RadioGroup

Properties

DevExpress.XtraEditors.Repository Namespace