Skip to main content
All docs
V25.2
  • GridContextMenuDefaultItemNames.HideGroupPanel Field

    The Hide Group Panel item’s name.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public const string HideGroupPanel = "HideGroupPanel"

    Field Value

    Type Description
    String

    The “HideGroupPanel” string.

    Remarks

    Specify the ContextMenus property to display context menus for the following Grid elements:

    Blazor Grid Context Menu - Supported Regions: Data Row, Footer, Group Footer, Group Panel, Group Row, Header

    Hide Group Panel is a Grid context menu item that hides the group panel. This item is available in group panel and header context menus if grouping is enabled at the Grid level and the group panel is visible.

    Use the HideGroupPanel field to apply the following customizations:

    • Access and customize the Hide Group Panel item
    • Add this item to a context menu
    • Remove the item from the group panel or header context menu

    Example

    The following code snippet removes the Hide Group Panel item from context menus:

    @inject WeatherForecastService ForecastService
    
    <DxGrid Data="@Data"
            ShowGroupPanel="true"
            AutoExpandAllGroupRows="true"
            ContextMenus="GridContextMenus.Header | GridContextMenus.GroupPanel"
            CustomizeContextMenu="CustomizeContextMenu">
        <Columns>
            <DxGridDataColumn FieldName="Date" DisplayFormat="D" />
            <DxGridDataColumn FieldName="TemperatureC" Caption="@("Temp. (\x2103)")" Width="120px" />
            <DxGridDataColumn FieldName="TemperatureF" Caption="@("Temp. (\x2109)")" Width="120px" />
            <DxGridDataColumn FieldName="Forecast" GroupIndex="0" />
            <DxGridDataColumn FieldName="CloudCover" />
        </Columns>
    </DxGrid>
    
    @code {
        object Data { get; set; }
    
        protected override void OnInitialized() {
            Data = ForecastService.GetForecast();
        }
        void CustomizeContextMenu(GridCustomizeContextMenuEventArgs args) {
            args.Items.Remove(GridContextMenuDefaultItemNames.HideGroupPanel);
        }
    }
    
    See Also