when i click on anny row to get column data it gives me arror 'Cannot read property '1' of undefine'
when i click on anny row to get column data it gives me arror 'Cannot read property '1' of undefine'
abd17
Posts: 4Questions: 3Answers: 0
this is my code
var table = $('#tblContactList').DataTable();
$('#tblContactList tbody').on('click', 'tr', function () {
var data = table.row(this).data();
debugger;
$(this).toggleClass('selected');
alert('You clicked on ' + data[1] + '\'s row');
});
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin