Bind ButtonGroup to Data
Use the items array to populate ButtonGroup with data. You can specify the following fields in data objects:
Process Button Selection
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 multiple.
Use the onItemClick function to process clicks on buttons.
Customize the Buttongroup Appearance
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.