Telerik UI for ASP.NET MVC ButtonGroup Basic Usage

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
index.cshtml
IndexController.cs

Also available for:

CLIENT-SIDE API SERVER-SIDE API
devcraft ninja image

The ButtonGroup component is part of Telerik UI for ASP.NET MVC, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Description

The Telerik UI for ASP.NET MVC ButtonGroup component groups a series of buttons together on a single line. A common example is a formatting group in a text editor or word processor, for example, groups for alignment (left, center, right) and styling (italic, bold, underline). The ButtonGroup inherits the Telerik UI for ASP.NET MVC Button features and adds a few more.

An example use case for the ButtonGroup is the selection of toggle buttons. You can group a set of toggle buttons and restrict the user to select a single button, much like radio buttons, or allow multiple selection, much like checkboxes. In either case, you can manage the events as one group rather than each item separately. Also, the component allows you to disable a specified button based on a condition (for example, you can disable a button if the user is not logged). In addition, you can customize the appearance of each button by adding icons and badges.

The current demo shows a basic implementation of a ButtonGroup that allows a single button selection.

The ASP.NET MVC ButtonGroup control is part of Telerik UI for ASP.NET MVC, a professional-grade UI library with 110+ components for building modern and feature-rich web applications. The ButtonGroup is a server-side wrapper for the Kendo UI for jQuery ButtonGroup component and comes in the form of an HtmlHelper.

Functionality and Features

  • Disabled ButtonGroup–You can set the ButtonGroup as disabled until a spcific requirement is met.
  • Icon ButtonGroup–The ButtonGroup enables you to add a variety of icons to the elements of the ButtonGroup items on the page to enhance their visual representation.
  • Badges–You can also specify a badge for each button by using the Badge() method.
  • Index–You can configure the initially selected index of the ButtonGroup component by using its Index property.
  • Selection–The ButtonGroup allows you to control the number of buttons that the user can select.
  • Events–You can subscribe to the available ButtonGroup events and implement custom functionalities.
  • Accessibility–The ButtonGroup is accessible for screen readers, supports WAI-ARIA attributes, and delivers keyboard shortcuts for faster navigation.

Additional Apps

This ButtonGroup example is part of a unique collection of hundreds of ASP.NET MVC demos, with which you can see all Telerik ASP.NET MVC components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in the ThemeBuilder.

Support & Learning Resources

Additional Resources