Datatable
Datatable copied to clipboard
how to provide complex options
Hi, Can anyone help me how to initialize datatable with complex options like this. oTable = $('#AttributesList-table').dataTable({ "aoColumnDefs": [ { "aTargets": [ '_all' ], "mRender": function ( data, type, full ) { if(data!=null) { return '
'+data+'
';
}
else
{
return '';
}
}
}
]
});
Actually I want to wrap cell data with tag.
You always have the possibility to edit the template directly if the given options does not satisfy your needs.
Check out pull request https://github.com/Chumper/Datatable/pull/264
You can also put that javascript function into your template and then just reference it by name to simplify things.