How to hide column while export.

5 posts, 0 answers
  1. developer
    developer avatar
    58 posts
    Member since:
    Nov 2015

    Posted 06 Apr 2016 Link to this post

    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!
  2. developer
    developer avatar
    58 posts
    Member since:
    Nov 2015
  3. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 08 Apr 2016 Link to this post

    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!
     
  4. developer
    developer avatar
    58 posts
    Member since:
    Nov 2015

    Posted 27 Apr 2016 in reply to Rosen Link to this post

    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!

     

  5. Rosen
    Admin
    Rosen avatar
    3253 posts

    Posted 28 Apr 2016 Link to this post

    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!
     
Back to Top