I'm using mRender to provide a rendering function for two columns in a DataTable. However, I can't use the same aoColumnDefs entry for both columns, because they access different columns of the data source, and mData only allows me to specify one column index.
Do I really need to repeat the mRender declaration for each column, even when they use the same renderer function, like so?
[code]
$('#vis').dataTable({
'aoColumnDefs': [
{ 'mRender': rendererFunction, 'mData': 3, 'aTargets': [ 3 ] },
{ 'mRender': rendererFunction, 'mData': 4, 'aTargets': [ 4 ] },
]});
[/code]
Do I really need to repeat the mRender declaration for each column, even when they use the same renderer function, like so?
[code]
$('#vis').dataTable({
'aoColumnDefs': [
{ 'mRender': rendererFunction, 'mData': 3, 'aTargets': [ 3 ] },
{ 'mRender': rendererFunction, 'mData': 4, 'aTargets': [ 4 ] },
]});
[/code]