I've not used the jquery datatable but have solved this problem with the grid here: http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo
If it's not supported out of the box with datagrid, you could do something similar (perhaps adding a "data-" attribute to each row).