Grid export of hidden columns

1 Answer 670 Views
Grid
Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
Martin Herløv asked on 04 Oct 2021, 09:16 AM | edited on 06 Oct 2021, 07:48 PM

I have hidden some columns using the code

<GridColumn Field="@nameof(DataEntryExternalUser.Name)" Editable="true" Visible="@IsVisible"/>

So when I edit in a pop-up form I set IsVisible=true;

The problem I have now is with exporting data. Only the visible columns is exported.

Can I somehow set IsVisible=true before triggering the export command?

Have tried setting it in the OnClick handler. Not working.
<GridCommandButton OnClick="@ShowLoadingSign" Command="ExcelExport" Icon="file-excel">Export to Excel</GridCommandButton>


1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Oct 2021, 07:47 PM

Hello Martin,

You can Follow the implementation of such functionality here: https://feedback.telerik.com/blazor/1479440-blazor-grid-export-columns-only-visible-for-export.

P.S.: I've also fixed the typo in the thread title and removed that bit from your post.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 07 Oct 2021, 05:38 AM

Good morning. Thanks for fixing my typos.

I have been thinking! What about adding an overload of the export command. Giving it a collection of ColumnDescriptors?


Marin Bratanov
Telerik team
commented on 07 Oct 2021, 05:29 PM

Feel free to post that as a comment in the portal for everyone's review. At this point I can't say exactly how this will be implemented, a proper research needs to be done first.
Tags
Grid
Asked by
Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or