ExportCsv with filter

UI Components for Angular
Post Reply
Posts: 7
Joined: 12 Jan 2017, 12:39

12 Jan 2017, 13:19

I need help.
I have a table:

Code: Select all

        <p-dataTable appendTo="body"
                     [rowStyleClass]="rowStyle" #dt>
          <p-column field="fullName" sortable="true"></p-column>
          <p-column field="id" sortable="true"></p-column>
          <p-column field="vehicle" sortable="true"></p-column>
          <p-column field="email" sortable="true"></p-column>
and global Filter

Code: Select all

<div class="row">
      <div class="col-md-3 col-xs-12">

        <input #gb type="text" pInputText placeholder="Search">

      <div class="col-md-8 col-xs-12">

      <div class="col-md-1 col-xs-12 text-right">

        <i class="fa fa-file-excel-o fa-2x" (click)="dt.exportCSV()" aria-hidden="true"></i>

I apply a filter, but when I click export, I have the entire table without filter. How do I apply a filters to export?

Posts: 7
Joined: 12 Jan 2017, 12:39

02 Feb 2017, 09:06

Can Anybody Help Me?
How to export only filtered values?

User avatar
PrimeFaces Core Developer
Posts: 4344
Joined: 16 Oct 2011, 19:19
Location: Singapore

02 Feb 2017, 09:39

Normally we won't export filter inputs in the document.Also check PrimeFaces CSV example.You need to customize exportCSV with filters object values.
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

Sudheer Jonna

Posts: 1
Joined: 09 Sep 2019, 09:02

09 Sep 2019, 09:04

Anyone any solution for this issue??

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests