Is there a way to hide a grid on the page, but still allow for export to Excel the "easy way" - using the ExportToExcel command?
For example, can this command be called by another button?
1 Answer, 1 is accepted
0
Marin Bratanov
Telerik team
answered on 23 Oct 2021, 11:51 AM
Hello Dean,
If you hide a grid the Blazor way (e.g., an @if(condition){<Grid>}, it will not render at all and so it could not be exported.
If you hide it with CSS alone, that might work, but it is a bit of an overkill. You may want to Vote for and Follow this enhancement idea for a programmatic export call, but it will still require a grid to be instantiated. If you don't want the grid, I can suggest you generate the exportin you separate application code, the Document Processing Libraries we offer let you do that. You can find a basic example here.
Sorry if I'm missing something but I get an error when adding a class to either a TelerikGrid or a GridColumn - it says it's not allowed. I'm a couple of versions behind, has this been added recently?