Skip to main content

GridXlExportOptions.ExportTotalSummaries Property

Specifies whether the grid exports total summaries.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[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.

<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