Hi
I have a problem with rendering a column. I need to convert my string into integer:
"columnDefs": [ {
"targets": 5,
"render": function ( data, type, row ) {
return parseInt(data);
}
}],
The code works fine but I use dataTables to generate tables on multiple pages and for those pages where there are two columns, the whole table will not work. Is there a way I can make render work only for a table with a specific id? I have tried something like:
"columnDefs": [ {
"targets": 5,
"render": function ( data, type, row ) {
if ( var table==='inventory_table' ) {
return parseInt(data)};
};
But it didn't work.