How to export (excel file) the grid with filters enabled?

1 Answer 146 Views
Excel Export Grid
alex
Top achievements
Rank 1
Iron
Veteran
alex asked on 03 May 2021, 12:37 PM

How to export the grid with filters enabled?

 


constructor() { 
                this.allData = this.allData.bind(this);
  }

  ngOnInit() {
    this.getGridData();
  }

  public allData(): ExcelExportData {
    const result: ExcelExportData =  {
        data: process(this.products, {sort: [{ field: 'name', dir: 'asc' }] }).data
    };

    return result;
  }

  getGridData(){
    this.MyService.getDataGrid().subscribe(data => {
      data = JSON.parse(data);;
      this.products= data;
      this.gridData = process(data, this.state)
    });
  }

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 05 May 2021, 12:03 PM

Hello Alex,

The default behaviour of the Grid is to export its current data. This includes the applied filters, so no custom modification will be needed in this case.

Regards,
Dimiter Madjarov
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
Excel Export Grid
Asked by
alex
Top achievements
Rank 1
Iron
Veteran
Answers by
Dimiter Madjarov
Telerik team
Share this question
or