New to Telerik UI for ASP.NET Core? Download free 30-day trial

Layout

The RadioGroup supports two types of layout - "horizontal" and "vertical". By default the radio buttons are rendered vertically.

The following example shows how to set the RadioGroup layout:

    @(Html.Kendo().RadioGroup()
        .Name("radiogroup")        
        .BindTo(new[] { "English", "German", "Italian", "Russian", "Spanish" })
        .Layout(RadioGroupLayout.Vertical)
        .Value("Italian")
    ) 
    @{
        var items = new List<IInputGroupItem>()
        {
            new InputGroupItemModel() { Label = "English", Enabled = true, Encoded = false, Value = "1" },
            new InputGroupItemModel() { Label = "German",  Enabled = true, Encoded = false, Value = "2" },
            new InputGroupItemModel() { Label = "Italian", Enabled = true, Encoded = false, Value = "3" },
            new InputGroupItemModel() { Label = "Russian", Enabled = true, Encoded = false, Value = "4" },
            new InputGroupItemModel() { Label = "Spanish", Enabled = true, Encoded = false, Value = "5" },     
        };
    }
    <kendo-radiogroup name="radiogroup"
                      radio-name="radiogroup" 
                      bind-to="items"
                      layout="RadioGroupLayout.Vertical"
                      value="3">
    </kendo-radiogroup>

See Also

In this article