We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Remove Columns in PDF Export

Thread ID:





105202 Sep 17,2012 08:34 PM UTC Sep 18,2012 07:27 AM UTC ASP.NET MVC (Classic) 1
Tags: Grid
Stefan Onken
Asked On September 17, 2012 08:34 PM UTC

I want to remove some columns that are visible in the Grid, so that they do not appear in the exported pdf. Is this possible?
Regards, Stefan

Eswari S [Syncfusion]
Replied On September 18, 2012 07:27 AM UTC

Hi Stefan,

Thank you for using Syncfusion products.

Query #: Remove Columns in PDF Export

splice() method adds/removes items to/from an array, and returns the removed item. In exporting , we have remove the specified column from VisibleColumns collection and after exporting we have restored the column into the grid using setTimeout function in OnToolbarClickEvent. Please refer to the following code snippets:

function begin(sender, args) {
            var gridObj = $find("SampleGrid");
            var visible = gridObj.get_VisibleColumns();
            window.tempDelete = [visible, visible.splice(0, 1)];
            window.setTimeout(function () {
                window.tempDelete[0].splice(0, 0, window.tempDelete[1][0]);
            }, 0);

We have prepared the sample for your requirement and the same can be downloaded from the following link:


Please try this and let us know if you have any other queries.

Eswari S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon