How to select the current row with a button action ? this statemet is not working table.row($(this
How to select the current row with a button action ? this statemet is not working table.row($(this
Hi Help Please
I added a button to my table
{
"targets": 8,
"data": null,
"defaultContent": "<button class='btn btn-info' >Select!</button>"
},
But I cannot select the current row when the user did click the error is undefined this line var data = table.row($(this).parents('tr')).data();
var table = $('#AvailableSignatoriesRemoval').DataTable();
$('#AvailableSignatoriesRemoval tbody').on('click', 'button', function () {
var data = table.row($(this).parents('tr')).data();
});
Answers
I am trying to do that
https://datatables.net/examples/ajax/null_data_source.html
I resolved I install the select js extension https://datatables.net/download/release
the solution is alert($('#AvailableSignatoriesRemoval').DataTable().row($(this).parents('tr')).data().AccountSignatoryId);