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

    Lists values that specify how the grid exports group rows.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public enum GridGroupExportMode

    Members

    Name Description
    None

    Group rows are not exported.

    KeepExpandState

    Group rows keep their expanded state in the exported document as they are in the source grid.

    ExpandAll

    All group rows are expanded in the exported document.

    CollapseAll

    All group rows are collapsed in the exported document.

    Related API Members

    The following properties accept/return GridGroupExportMode values:

    Remarks

    The grid exports group rows in their current expanded state. You can specify the GroupExportMode property to export each group row expanded, collapsed, or prevent group row export.

    In the following code snippet, the GroupExportMode property is set to None to not export group rows.

    <DxGrid @ref="Grid" Data="@Data" ShowGroupPanel="true" >
        <Columns>
            <DxGridDataColumn FieldName="ContactName" />
            <DxGridDataColumn FieldName="ContactTitle" />
            <DxGridDataColumn FieldName="CompanyName" />
            <DxGridDataColumn FieldName="Country" GroupIndex="0" />
        </Columns>
    </DxGrid>
    
    <OptionButton Text="Export to XLSX" OnClick="ExportXlsx_Click" />
    
    @code {
        IEnumerable<object> Data { get; set; }
        IGrid Grid { get; set; }
        protected override async Task OnInitializedAsync() {
            Data = await NwindDataService.GetCustomersAsync();
        }
        async Task ExportXlsx_Click() {
           await Grid.ExportToXlsxAsync("ExportResult", new GridXlExportOptions() {
                GroupExportMode = GridGroupExportMode.None,
            });
        }
    }
    
    See Also