Overview

Click Buttons (No Selection)
Radio Group (Single Selection)
Toggle Buttons (Multiple Selection)
Vertical Orientation

Our Blazor Button Group displays a set of buttons. You can arrange buttons vertically/horizontally, enable selection, apply predefined styles to all buttons or or to a button individually.

Button Group APIs include the following key members:

The Button Group component also supports different size modes. To specify component size in code, use the SizeMode property.

 Toggle Button Group as a Filter Control

 
Product Name Category Unit Price Units in Stock Quantity per Unit Discontinued
ChaiBeverages$18.003910 boxes x 20 bags
ChangBeverages$19.001724 - 12 oz bottles
Aniseed SyrupCondiments$10.001312 - 550 ml bottles
Chef Anton's Cajun SeasoningCondiments$22.005348 - 6 oz jars
Chef Anton's Gumbo MixCondiments$21.00036 boxes
Grandma's Boysenberry SpreadCondiments$25.0012012 - 8 oz jars
Uncle Bob's Organic Dried PearsProduce$30.001512 - 1 lb pkgs.
Northwoods Cranberry SauceCondiments$40.00612 - 12 oz jars
Mishi Kobe NikuMeat/Poultry$97.002918 - 500 g pkgs.
IkuraSeafood$31.003112 - 200 ml jars
Queso CabralesDairy Products$21.00221 kg pkg.
Queso Manchego La PastoraDairy Products$38.008610 - 500 g pkgs.
KonbuSeafood$6.00242 kg box
TofuProduce$23.003540 - 100 g pkgs.
Genen ShouyuCondiments$16.003924 - 250 ml bottles
PavlovaConfections$17.002932 - 500 g boxes
Alice MuttonMeat/Poultry$39.00020 - 1 kg tins
Carnarvon TigersSeafood$63.004216 kg pkg.
Teatime Chocolate BiscuitsConfections$9.002510 boxes x 12 pieces
Sir Rodney's MarmaladeConfections$81.004030 gift boxes
Data grid with 77 rows and 6 columns
0 rows are selected

This demo illustrates how to integrate a Button Group into the DevExpress Blazor Grid component (to filter grid data). The Blazor Button Group component imitates a Grid toolbar and uses Miltiple selection mode. When you click a button group item, the Grid applies corresponding filters to its data.

To replicate this demo and attach a Button Group to our Blazor Grid, you must:

  1. Add a ToolbarTemplate to the Grid component's markup.
  2. In the template, add a DxButtonGroup component and set its selection mode to Multiple.
  3. Create button group items based on Grid Category column values.
  4. In buttom group item's Click event handler, call the Grid's SetFieldFilterCriteria method to filter grid data based on selected categories.