ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: queensgambit9 on June 17, 2016, 03:42:09 pm
-
Hi
When using exportData function, I get the rendered html code for the field.
Ex:
render: function (ui) {
return "<span>"+ ui.cellData +"</span>";
}
Will in export be <span>value</span>...I only want to get the value...
Is this possible?
-
There are many ways to do that. Few of them:
Pass render: false to exportData() method
or
add exportRender: false to the column.
http://paramquery.com/pro/api#option-column-exportRender
-
Great, thanks.
I assume its not possible to use render: false and still have the percentage sign written out in the export, or is there another way to do it?
render: function (ui) {
return "<span>"+ ui.cellData +"%</span>";
}
-
There is Export property available in column.render callback which can be used:
render: function (ui) {
if( ui.Export ){
return ui.cellData +"%";
}
else{
return "<span>"+ ui.cellData +"%</span>";
}
http://paramquery.com/pro/api#option-column-render
In this case, render: true should be passed to exportData()