- Notifications
You must be signed in to change notification settings - Fork 80
chore(grid): refactor export notes #2835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
28 commits Select commit Hold shift + click to select a range
63cb656
chore(grid): refactor export notes
ntacheva ee4b758
chore(Grid): add kb for showing loader during export
ntacheva ea3792a
chore(grid): kb for load cyrillic fonts when exporting to pdf
ntacheva f5f0262
chore(grid): add example for loading cyrillic fonts
ntacheva c563727
chore(grid): updates
ntacheva d2a884d
Update components/grid/export/excel.md
ntacheva 946a8bd
Update knowledge-base/grid-load-cyrillic-fonts-in-pdf-export.md
ntacheva 74df580
Update knowledge-base/grid-show-loader-while-exporting.md
ntacheva b1f0c08
Update knowledge-base/grid-show-loader-while-exporting.md
ntacheva f614827
Update components/grid/export/excel.md
ntacheva 0182f52
Update components/grid/export/overview.md
ntacheva 615236d
Update components/grid/export/overview.md
ntacheva 7185cad
Update components/grid/export/overview.md
ntacheva 624c530
Update knowledge-base/grid-load-cyrillic-fonts-in-pdf-export.md
ntacheva 88acdfc
Update components/grid/export/pdf.md
ntacheva d821ee1
Update knowledge-base/grid-load-cyrillic-fonts-in-pdf-export.md
ntacheva 4bb1009
chore(grid): address feedback
ntacheva 2b706ca
Update components/grid/export/overview.md
ntacheva 624e886
Update components/grid/export/overview.md
ntacheva d646ccf
Update components/grid/export/overview.md
ntacheva 3693bcd
Update components/grid/export/overview.md
ntacheva cca2f0a
Update components/grid/export/overview.md
ntacheva f13b5bc
Update components/grid/export/overview.md
ntacheva 9e19c5f
Update components/grid/export/pdf.md
ntacheva 511ea83
Update components/grid/export/overview.md
ntacheva 4adc76f
chore(grid): address feedback
ntacheva 2c3ae2a
chore(grid): final updates
ntacheva 998960d
chore(grid): update note
ntacheva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Overview | ||
page_title: Grid - Export Overview | ||
description: Export basics for the Grid for Blazor. | ||
slug: grid-export-overview | ||
tags: telerik, blazor, grid, export | ||
published: True | ||
position: 1 | ||
--- | ||
| ||
# Blazor Grid Export | ||
| ||
The Grid for Blazor provides a built-in functionality to export the data to: | ||
* [CSV](slug:grid-export-csv) | ||
* [Excel](slug:grid-export-excel) | ||
* [PDF](slug:grid-export-pdf) | ||
| ||
Before proceeding to the dedicated export articles, ensure you are familiar with the following specifics: | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
## How the Export Works | ||
| ||
* If the Grid is using `OnRead` and is exporting all pages, it will fire an additional `OnRead` event at the time of exporting, with a request `PageSize` of `0`. This will enable the component to obtain all data. | ||
* The time for export will be longer if the Grid has a lot of records and/or in Client-side Blazor (WebAssembly) where all the code runs in the browser and, at the time of writing, is considerably slower than server-side Blazor, and it only has one actual thread. While the file is being generated, the UI will be unresponsive, so you may want to [show a loading sign to the user during the export process](slug:grid-kb-show-loader-while-exporting). | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
## Requirements | ||
| ||
* With Server-side Blazor, the file may become larger than the default SignalR connection limit, and this can disconnect the client and result in an error. Generally, this requires quite a lot of data to happen, but you may need to increase the size limit of the connection in the `ConfigureServices` method of your `Startup.cs` file, for example: | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
````C#.skip-repl | ||
services.AddServerSideBlazor().AddHubOptions(o => | ||
{ | ||
o.MaximumReceiveMessageSize = 1024 * 1024; // 1MB | ||
}); | ||
```` | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
## Limitations | ||
| ||
* Templates are not exported, because there is no provision in the framework for getting them at runtime. If a column, header or group header/footer has a template or aggregates, it will be ignored. The headers will be the `Title` of the column, the data is the data from the `Field`. If you need additional information, see if you can add it in a Field in the model, or create your own file. Find a <a href="https://feedback.telerik.com/blazor/1485764-customize-the-Pdf-file-before-it-gets-to-the-client" target="_blank">project example on how to generate your own exported file</a>. Find additional information on how to [export an image that is rendered in a Grid column template](slug:grid-export-image-column-excel). | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
* `bool` fields are exported as `TRUE` or `FALSE` strings, because there is no native boolean data type in exported format and these string values are the most common ones used in data and macros. | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
* Date and number formats are exported with the following format: `mm/dd/yyyy hh:mm:ss` plus the current app culture AM/PM specifier for dates, and `Convert.ToDouble(value)` for numbers (which uses the current thread culture). The Excel date formats are different than .NET date formats and Excel may not always recognize the column as dates, for example, if the entire date format from the .NET culture is used. To customize the date and number formats, use the [Export Events](slug: grid-export-events). | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
* The Grid exports only `<GridColumn>` instances. Other types of columns are not exported, for example command, checkbox, hierarchy, group and row-drag columns. | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
## Customization | ||
| ||
The Grid allows customizing the exported files - determine the desired data to be exported, changing the number/date formats and more. For such customizations, [handle the export events](slug:grid-export-events). | ||
ntacheva marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
## See Also | ||
| ||
* [Grid Export to CSV](slug:grid-export-csv) | ||
* [Grid Export to Excel](slug:grid-export-excel) | ||
* [Grid Export to PDF](slug:grid-export-pdf) | ||
* [Live Demo: Grid Export](https://demos.telerik.com/blazor-ui/grid/export) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.