Skip to main content
All docs
V25.1
  • ButtonGroupSelectionMode Enum

    Lists values that specify how many items can be selected in the DxButtonGroup component.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public enum ButtonGroupSelectionMode

    Members

    Name Description
    None

    Users cannot select items.

    Single

    Users can select one item.

    Multiple

    Users can select multiple items.

    Related API Members

    The following properties accept/return ButtonGroupSelectionMode values:

    Remarks

    Use the SelectionMode property to specify the item selection mode in the DxButtonGroup component.

    The following code snippet sets the component’s selection mode to Single and displays the current selection state of the Admin button group item:

    <p>Is item selected - @IsItemSelected</p>
    
    <DxButtonGroup RenderStyle="ButtonRenderStyle.Secondary"
                   RenderStyleMode="ButtonRenderStyleMode.Outline"
                   SelectionMode="ButtonGroupSelectionMode.Single">
        <Items>
            <DxButtonGroupItem Text="Admin"
                               Selected="@IsItemSelected"
                               SelectedChanged="@OnSelectedChanged"/>
            <DxButtonGroupItem Text="Editor" />
            <DxButtonGroupItem Text="Guest" />
        </Items>
    </DxButtonGroup>
    
    @code {
        bool IsItemSelected = false;
    
        void OnSelectedChanged(bool isSelected) {
            IsItemSelected = isSelected;
        }
    }
    
    See Also