I have one column in my table called "Info" where i have a code to render that column where if string is longer then 20 characters it will shorten it and put '...' at the end of string. Here is an example:
{
targets: 4,
"data": "info",
"render": function(data, type, row, meta) {
if(type === 'export') {
return data;
}
if (data != null) {
return type === 'display' && data.length > 20 ?
'<p data-toggle="tooltip" title="' + data + '">' + data.substr(0, 20) + '...</p>' : data;
} else {
return data;
}
}
},
Problem here is when I generate PDF I have data in that column shorten with '...', is it possible to have full data (full string) in pdf, excel etc. while having it shorten in table (column). I can always make one more column and make it invisible and then put that column in pdf. Is there any other way?