New to Telerik UI for ASP.NET Core? Download free 30-day trial

Excluding Columns from the Exported PDF File


Product Grid for Progress® Telerik® UI for UI for ASP.NET Core


How can I exclude certain columns from the exported PDF file in a Telerik UI for ASP.NET Core Grid?


Using the k-pdf-export Class and CSS

To hide a Grid column only during the PDF export, use a CSS rule and reduce the width of the target column to zero. This approach is implemented because the Kendo UI Drawing API adds the k-pdf-export class on all elements of the exported content and you can target specific elements in the following way.

  .k-pdf-export colgroup > col:nth-child(4) {
    width:0; /* hides only the 4th column during PDF export */

For example refer to this Telerik REPL Project

Using the showColum() and hideColumn() Grid Methods

  1. Hide the columns by using the hideColumn method within the pdfExport event handler.
  2. When the export is done, display the hidden column by using the showColumn method.
    var exportFlag = false;
    function onPdfExport(e){
             if (!exportFlag) {
              exportFlag = true;

                exportFlag = false;


For example refer to this Telerik REPL Project

More ASP.NET Core Grid Resources

See Also

In this article