ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: derbySoft on February 14, 2017, 01:34:29 pm

Title: Messy code when exporting to csv file
Post by: derbySoft on February 14, 2017, 01:34:29 pm
We are having some problem when exporting table content to csv. In the content, there are some special characters such as '∞'. There is no problem for the excel format but it turns to messy code in csv file.

Is there a way to fix it or a workaround to override the content? Thanks.
Title: Re: Messy code when exporting to csv file
Post by: paramvir on February 14, 2017, 05:47:00 pm
The cell content can be overridden while export in column.render callback and use of properties column.exportRender and passing render: true to exportData() method.

Code: [Select]
column.render = function(ui){
  if(ui.Export){ //true while export.
     return "custom value";
  }
}

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

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

https://paramquery.com/pro/api#method-exportData