Issues with Row click

Issues with Row click

martij2martij2 Posts: 1Questions: 0Answers: 0
edited April 2014 in General
Hi, I really like this plugin!

However I have been through the forums and examples but am unable to get the row click to work on my table. I am loading data from an .ashx handler and then adding the click event but it doesnt work. here is my code. Any ideas on what I'm doing wrong? Many thanks.

$(document).ready(function () {

var oTable = $('#customersDataTable').dataTable({

"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": false,
"sAjaxDataProp": "aaData",
"sAjaxSource": "Customers.ashx?franchiseid =" + $('franchiseId').val(),
"aoColumns": [
{ "mData": "Customer" },
{ "mData": "Customerid" }]

});
$('#customersDataTable tbody tr').click(function () {
// var aData = oTable.fnGetData(this);
alert("Hi"); // assuming the id is in the first column
});



});
This discussion has been closed.