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

Group

The ASP.NET Core ToggleButton component exposes the ability to group several instances into one distinguished group. This gives you the advantage of molding several ToggleButton instances and accessing them altogether via the data-group attribute, which will be rendered for the elements.

The following example illustrates how to enable the group functionality

     @(Html.Kendo().ToggleButton()
         .Name("volumeUpBtn")
         .Group("volumes")
         .Selected(true)
         .Content("Increase volume")
     )

     @(Html.Kendo().ToggleButton()
         .Name("volumeMuteBtn")
         .Group("volumes")
         .Content("Mute volume")
     )
    @addTagHelper *, Kendo.Mvc

     <div>
        <kendo-togglebutton name="volumeUpBtn"
                            group="volumes"
                            selected="true">
            Increase Volume
        </kendo-togglebutton>
    </div>

    <div>
        <kendo-togglebutton name="volumeMuteBtn"
                            group="volumes">
            Increase Volume
        </kendo-togglebutton>
    </div>

See Also

In this article