I need to hide a column on the table, but after that I cannot read selected row\'s hidden column value.
dtTable = $(\'#lookupTable\').DataTable({
\"c
Traditional jquery wont work on datatable , you have to use API defined methods to get the value. In my case this worked fine to get hidden column value on button click in each row -
$(function () {
var t = $('#mytableid').DataTable({
"columnDefs": [{
"searchable": false,
"orderable": false,
"visible":false,
"targets": [0]
}]
});
$('#mytableid').on('click', '.btnClass', function () {
var currentRow = $(this).closest("tr");
var columnvalue = t.row(currentRow).data()[0];
console.log(columnvalue);
});
});