I\'m working on a history development of a particular user and I want it to be done with dataTables. However, I cannot find the way with which I can make my row or a particu
First make sure you change the code of your dataTable initialization to save into a variable like this
var oPatientMedicalHistory = $('#patient_medical_history').DataTable({
//your stuff
});
Then you can assign a click event to all the rows like this
EDIT: As Pointed out by Gyrocode.com, we should use delegated event handler as the tr's are created dynamically as we page. So The code should look like.
$('#patient_medical_history tbody').on('dblclick','tr', function() {
var currentRowData = oPatientMedicalHistory.row(this).data();
// alert(currentRowData[0]) // wil give you the value of this clicked row and first index (td)
//your stuff goes here
});
This must help you out.