This is a migrated thread and some comments may be shown as answers.
How to hide column while export.
4 Answers 228 Views
This is a migrated thread and some comments may be shown as answers.
developer
Top achievements
Rank 1
developer asked on 06 Apr 2016, 09:56 AM
Hi,

I'm trying hide the column while export to PDF or Excel. I've given hideColumn(index) in pdfExport. It is removing the column in PDF that's fine. But also removed from the Grid. 

find the code here => DOJO

Is there is any other way to hide specific column only in export?

Thanks!

4 Answers, 1 is accepted

Sort by
0
developer
Top achievements
Rank 1
answered on 06 Apr 2016, 10:00 AM
0
Rosen
Telerik team
answered on 08 Apr 2016, 07:26 AM

Hi,

You could use the promise accessible via the pdfExport event to show back the column after the document is exported. Similar to the following:

                            pdfExport: function(e) {
                                   e.promise.then(function() {
                  grid.showColumn(3);
                });
                grid.hideColumn(3);
            }

 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
developer
Top achievements
Rank 1
answered on 27 Apr 2016, 10:02 AM

Hi Rosen,

The solution is working fine for PDF. But it is not working for excel.

Can you provide the solution to hide the columns while export to excel as well.

Thank you!

 

0
Rosen
Telerik team
answered on 28 Apr 2016, 06:47 AM

Hi,

A possible way to hide columns during Excel export is discussed in this forum. Please give it a try and see if this helps.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
developer
Top achievements
Rank 1
Answers by
developer
Top achievements
Rank 1
Rosen
Telerik team
Share this question
or