Behavior settings
26 Apr 20181 minute to read
Groupbutton provides options through which you can customize the default behavior of Groupbutton control.
Groupbutton Mode
The default behavior of Groupbutton is like Radiobutton, i.e., only one item can be selected at a time.
@Html.EJ().GroupButton("GroupButton").GroupButtonMode(GroupButtonMode.RadioButton).Items(item =>
{
item.Add().Text("Save");
item.Add().Text("Open");
item.Add().Text("Delete");
})
RadioButton mode {:.caption}
To enable selection of one or more Groupbutton items at a time, you can set the Groupbutton mode to Checkbox. With this, you can toggle the each button’s state to perform actions, since all the button will behave like individual buttons.
@Html.EJ().GroupButton("GroupButton").GroupButtonMode(GroupButtonMode.CheckBox).Items(item =>
{
item.Add().Text("Save");
item.Add().Text("Open");
item.Add().Text("Delete");
})
CheckBox mode {:.caption}