Author Topic: column.exportRender not taken into account?  (Read 2082 times)

[email protected]

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 30
    • View Profile
column.exportRender not taken into account?
« on: November 25, 2018, 07:11:15 pm »
I am exporting grid to XLSX using following but all columns are exported regarless the column.exportRender is set to false (neither exportRender callback is not called) - see col0,col1 and col2.

  var blob = grid.exportData({format: 'xlsx', sheetName: 'report', render: true});
  saveAs(blob, "exported-report.xlsx");

    pqdata.colmodel[0].render = checkBoxRender;
    pqdata.colmodel[0].exportRender = false;
    pqdata.colmodel[1].exportRender = false;
    pqdata.colmodel[2].render = function(ui) {if (ui.Export) return ui.rowData['col10']; else return unescapeHTML(ui.cellData)};
    pqdata.colmodel[2].exportRender = function(ui) {console.log('here'); return ui.rowData['col10']};

Any help appreciated.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: column.exportRender not taken into account?
« Reply #1 on: November 26, 2018, 02:46:04 pm »
column.exportRender has a different purpose.

Please use column.copy property.

https://paramquery.com/pro/api#option-column-copy

[email protected]

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: column.exportRender not taken into account?
« Reply #2 on: December 02, 2018, 04:04:25 pm »
this is it :--)
Thanks