Export All Pages as a button instead of a checkbox?

1 Answer 9 Views
Grid
Jason
Top achievements
Rank 1
Iron
Veteran
Jason asked on 05 Jan 2022, 07:03 PM

I would like two buttons that Export Page and Export All Pages, instead of the checkbox in the example. I tried setting the ExportAllPages in the OnClick, but as expected, the export runs before that OnClick. Maybe I'm missing an easier way to set that on a button?

<GridToolBar>
    <GridCommandButton Command="CsvExport" Icon="file-csv" OnClick="(() => SetExportAllPages())">Export All Pages</GridCommandButton>
    <GridCommandButton Command="CsvExport" Icon="file-csv" OnClick="(() => SetExportOnePage())">Export Page</GridCommandButton>

....

<GridExport>
    <GridCsvExport FileName="export" AllPages="@ExportAllPages" />
</GridExport>

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 08 Jan 2022, 01:07 PM

Hello Jason,

Thank you for bringing this up. Indeed, the CSV export does not seem to honor the AllPages settign, but the Excel one seems to on my end so hopefully that can be a workaround for you.

I also logged this for review and you can Follow it here: https://feedback.telerik.com/blazor/1548720-saveascsvfileasync-does-not-honor-allpages.

Regards,
Marin Bratanov
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Iron
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or