I have a datatable that is created with Ajax. However, I do not want all the fields to be displayed and thus I set bVisible to false on the not-so-important field.
Here is an example of getting row's data on a click.
Suppose you have Delete or any button with each row of the table and if you click on the button, get the data of the selected row and perform required operation.
$(document).ready(function(){
$('#example tbody').on('click', '.delete', function(){
var row = $(this).closest('tr');
var data = $('#example').dataTable().fnGetData(row);
console.log(data);
});
});