windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemradiogroup-f1d77112.md
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
[DefaultValue(0)]
[DXCategory("Data")]
public int Columns { get; set; }
<DXCategory("Data")>
<DefaultValue(0)>
Public Property Columns As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 0 |
An integer value indicating the number of columns.
|
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
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
Controls.Add(radioGroup)
radioGroup.Properties.Columns = 2
radioGroup.Properties.Items.Add(New DevExpress.XtraEditors.Controls.RadioGroupItem(ChangeMode.Cell, "Cell"))
See Also
RepositoryItemRadioGroup Class