Back to Devexpress

RepositoryItemRadioGroup.Columns Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemradiogroup-f1d77112.md

latest3.1 KB
Original Source

RepositoryItemRadioGroup.Columns Property

Gets or sets the number of columns displayed within the radio group editor. This property is in effect in Column layout mode (see RepositoryItemRadioGroup.ItemsLayout).

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(0)]
[DXCategory("Data")]
public int Columns { get; set; }
vb
<DXCategory("Data")>
<DefaultValue(0)>
Public Property Columns As Integer

Property Value

TypeDefaultDescription
Int320

An integer value indicating the number of columns.

|

Remarks

If the radio group contains multiple items, they can be displayed in several columns. Use the Columns property to specify the number of columns.

If the Columns property is set to 0 , the radio group automatically calculates the number of columns according to the editor’s size.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Columns property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-multi-cell-editing/CS/Form1.cs#L17

csharp
Controls.Add(radioGroup);
radioGroup.Properties.Columns = 2;
radioGroup.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(ChangeMode.Cell, "Cell"));

winforms-grid-multi-cell-editing/VB/Form1.vb#L18

vb
Controls.Add(radioGroup)
radioGroup.Properties.Columns = 2
radioGroup.Properties.Items.Add(New DevExpress.XtraEditors.Controls.RadioGroupItem(ChangeMode.Cell, "Cell"))

See Also

ItemsLayout

RepositoryItemRadioGroup Class

RepositoryItemRadioGroup Members

DevExpress.XtraEditors.Repository Namespace