How to get aTargets' array length?
How to get aTargets' array length?
I am using aoColumnDefs from the Datatable jQuery library. So I can use "aTargets": [1, 2] or such to define which column I want to change by this function. But my tables are dynamic, and I want to apply this function to all the columns except the first one. So how can I achieve this?
The code I used:
[code]
jQuery('.summary_tables').dataTable({
"aoColumnDefs": [
{
"aTargets": [1,2,-1],
"bUseRendered": false,
"fnRender": function ( o ) {
return o.oSettings.fnFormatNumber( parseInt( o.aData[ o.iDataColumn ] ) );
}
}
]
});
[/code]
The code I used:
[code]
jQuery('.summary_tables').dataTable({
"aoColumnDefs": [
{
"aTargets": [1,2,-1],
"bUseRendered": false,
"fnRender": function ( o ) {
return o.oSettings.fnFormatNumber( parseInt( o.aData[ o.iDataColumn ] ) );
}
}
]
});
[/code]
This discussion has been closed.