Author Topic: Export To CSV doesn't append Summary row  (Read 3744 times)

Soumya

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 23
    • View Profile
Export To CSV doesn't append Summary row
« on: November 13, 2013, 02:52:13 am »
Export To CSV works fine for all the content. But when there is a Summary row similarly to http://paramquery.com/demos/summary , summary row is not appended in the CSV/Excel.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Export To CSV doesn't append Summary row
« Reply #1 on: November 13, 2013, 03:05:22 pm »
Currently exportCsv / exportExcel exports only the main data in the grid.

However you can include the summary data in csv file by appending the summary row in dataModel.data (without refreshing the view) just before invoking http://paramquery.com/pro/api#method-exportCsv and removing the row after that.

steps:

1) dataModel.data.push(summary row)

2) exportCsv or exportExcel

3) remove the row from dataModel.data using splice. http://www.w3schools.com/jsref/jsref_splice.asp




« Last Edit: November 13, 2013, 06:49:10 pm by paramquery »