ButtonGroup displays a set of two-state buttons and allows users to select one or multiple buttons. This demo illustrates how to configure the ButtonGroup in the following steps:
Bind ButtonGroup to data.
Enable or disable multiple selection.
Customize the ButtonGroup appearance.
Use the items array to populate ButtonGroup with data. You can specify the following fields in data objects:
Set the keyExpr property to the data field that supplies keys used to distinguish the selected buttons. In this demo, the selectedItemKeys property contains the keys of the selected buttons. This property allows you to predefine selected buttons. To enable multiple selection, set the selectionMode property to
Use the onItemClick function to process clicks on buttons.
Specify the stylingMode property and select one of the three predefined styles. In this demo, the button groups in the first row have the
outlined style, while others have the
text style. You can specify the buttonTemplate property to customize the apperance of each button.
To get started with the DevExtreme ButtonGroup component, refer to the following tutorial for step-by-step instructions: Getting Started with ButtonGroup.