I have this datatable setup:
$(document).ready(function() {
$(\'#RectifiedCount\').dataTable( {
"bJQueryUI": true,
"bProcessing
I did the following:
oTable = $('#RectifiedCount').dataTable( ....);
$('#RectifiedCount tbody tr').live('click', function (event) {
var aData = oTable.fnGetData(this); // get datarow
if (null != aData) // null if we clicked on title row
{
//now aData[0] - 1st column(count_id), aData[1] -2nd, etc.
}
});
Mutch better way instead of hooking a click event, using just jquery and TableTools:
"oTableTools": {
"sRowSelect": "single",
"fnRowSelected": function(node) {
var row = $(node).find('td');
//all cells
$.each(row, function(index, td) {
console.log($(td).text());
});
console.log("Specific cell content: " + $(row[2]).text());
}
}