Hello, I have tried the bootstrap.html server side example ... I need to align right only "salary" column.
I have inserted this code in style tag ...
but this aligns all columns .. Can you help me ?
Antonello
something may be : http://datatables.net/forums/discussion/456/aocolumns-with-multiple-arguments
$('#example').dataTable({ "aoColumns": [ //Row control { "firstname": "firstname" , "sClass": "center"}, { "salary": "salary" , "sClass": "right" }, ] });
I'd suggest adding a class to the column you want to align right. If you can't do it in HTML then use columns.className to add it. Then use CSS to align right the text for that class.
columns.className
Allan
thanks to all
I use this:
{ data: "salary", render: $.fn.dataTable.render.number( '.', ',', 2, '' ),"sClass": "salaryright" }
and style
.salaryright { text-align: right; }
It looks like you're new here. If you want to get involved, click one of these buttons!
Replies
something may be : http://datatables.net/forums/discussion/456/aocolumns-with-multiple-arguments
I'd suggest adding a class to the column you want to align right. If you can't do it in HTML then use
columns.className
to add it. Then use CSS to align right the text for that class.Allan
thanks to all
I use this:
{ data: "salary", render: $.fn.dataTable.render.number( '.', ',', 2, '' ),"sClass": "salaryright" }
and style
.salaryright { text-align: right; }
Antonello