fnCellRender option not working

fnCellRender option not working

jsidhujsidhu Posts: 7Questions: 0Answers: 0
edited April 2014 in TableTools
I am using "sAjaxSource" to render the data from the server. I have few columns. One of the column also renders two links which are dropdown toggle.
"aoColumns": [
'sName':'ID' ,
'mDataProp': 'SYS_ID',
'sTitle': 'C Sys ID',
'bSortable': true,
'aDataSort': true,
'bVisible': true,
'bSortable': false,
'sWidth': "60px",
'sType': 'html',
'mRender': function(data,type,full){
return ""+data +"ViewEdit";

When I use the TableTools as:
sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/assets/plugins/tables/dataTables/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"sExtends": "collection",
"sButtonText": 'Save Data on screen ',
"aButtons": [ "csv", "xls", "pdf" ],

the exported csv/pdf file prints the above column as "value+ViewEdit" for ex:"data123ViewEdit" for that particular column.

How can I get rid off "ViewEdit" in that column in csv/pdf.

I tried using "fnCellRender" but didnt helped.

Can anyone plz help me with that?


  • tangerinetangerine Posts: 3,235Questions: 30Answers: 380
    edited April 2014
    It may be your mRender function "return" value. Check your use of quotes,
  • jsidhujsidhu Posts: 7Questions: 0Answers: 0
    thx for the response.

    yes it is coz of the mRender function. So my question is how can I hide that :viewEdit" from mRender function in the exported csv/excel/pdf?

    Please help!!
  • allanallan Posts: 56,837Questions: 1Answers: 9,035 Site admin
    You'd need to modify TableTools since it uses the display value for the export.

  • jsidhujsidhu Posts: 7Questions: 0Answers: 0
    Can you please help me what needs to be modify in the tabletools?
  • jsidhujsidhu Posts: 7Questions: 0Answers: 0
    I figured out that fnCellRender doenot works if the button type is of type "collection". Can anyone help me with the workaround to edit the column values with the "collection" button type.

    please help!! its urgent
  • jsidhujsidhu Posts: 7Questions: 0Answers: 0
    i figured it out!!

This discussion has been closed.