Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridXlExportOptions.ExportTotalSummaries Property

Specifies whether the grid exports total summaries.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
public bool ExportTotalSummaries { get; set; }

#Property Value

Type Default Description
Boolean true

true to export total summaries; otherwise, false.

#Remarks

The grid exports total summaries to XLS and XLSX files. Set the ExportTotalSummaries property to false to exclude summaries from exported files.

razor
<DxGrid @ref="Grid" Data="@Data" >
    <Columns>
        <DxGridDataColumn FieldName="ContactName" />
        <DxGridDataColumn FieldName="ContactTitle" />
        <DxGridDataColumn FieldName="CompanyName" />
        <DxGridDataColumn FieldName="Country" />
    </Columns>
    <TotalSummary>
        <DxGridSummaryItem FieldName="ContactName" SummaryType="GridSummaryItemType.Count" />
    </TotalSummary>
</DxGrid>

@code {
    IEnumerable<object> Data { get; set; }
    IGrid Grid { get; set; }
    bool ExportSelectedRowsOnly { get; set; }
    protected override async Task OnInitializedAsync() {
        Data = await NwindDataService.GetCustomersAsync();
    }
    async Task ExportXlsx_Click() {
        var options = new GridXlExportOptions();
        options.ExportTotalSummaries = false;
       await Grid.ExportToXlsxAsync("ExportResult", options);
    }
}

Use the ExportGroupSummaries property to specify whether the grid exports group summaries.

See Also