This is a migrated thread and some comments may be shown as answers.

Hide Filter icons when export to PDF

1 Answer 710 Views
Grid
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 09 Nov 2018, 06:44 PM

I configured a filterable table, and when exporting it to PDF, I want to hide the filter icons (k-grid-filter).

I tried to set them to display none, but they get hidden also in the grid on the webpage, not on the pdf. I want to hide them on the PDF only

1 Answer, 1 is accepted

Sort by
1
Georgi
Telerik team
answered on 13 Nov 2018, 01:55 PM
Hello Freddy,

During PDF export, the toplevel DOM element will get the CSS class "k-pdf-export", and thus you can use plain CSS to exclude elements of your choice. For example to exclude the filter icons use the following css:

.k-pdf-export .k-filterable .k-grid-filter{
  display:none;
}

Below you will find a small sample which demonstrates the above approach:



Regards,
Georgi
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Kiran
Top achievements
Rank 1
commented on 29 Dec 2023, 10:58 AM | edited

I guess, After latest upgrade the css class has changed - This has worked for me.

.k-pdf-export .k-filterable .k-grid-filter-menu {
    display: none;
}
Tags
Grid
Asked by
n/a
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or