Clickable row Server side not working

Clickable row Server side not working

Taka HoTaka Ho Posts: 6Questions: 2Answers: 0
edited October 2018 in Free community support

Hi

I want to click on a row and give all details of that row.
I tried with example code but it isn't working.

[code]

var oTable = $('#clients').DataTable({
"sAjaxSource": "/data/clients",
"sAjaxDataProp": "",
"order": [[ 0, "asc" ]],
"aoColumns": [
{ "mData": "id"},
{ "mData": "name" },
],
"processing": true,
"serverSide": true
});

$('#clients tbody').on('click', 'tr', function () {
    var aData = oTable.fnGetData(this);
    alert(aData[0]);
});

[/code]

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.