Deselect row with button extend
Deselect row with button extend
rochile
Posts: 3Questions: 1Answers: 1
hi i need to reset the row values or table when the checkbox is deselected.... this is my table and always show the value of the first selected checkbox, even if i deselect and selected other row.... i try to find the solution but it has not worked
var table = $('#example').DataTable( {
dom: 'B<"pull-right"f>rtip',
buttons: [
{ extend: 'selected',
text: 'Agregar parcela',
action: function ( e, dt, node, config ) {
alert(dt.row().data()[8]);
}
}
],
columnDefs: [ {
orderable: false,
className: 'select-checkbox',
targets: 0
},
{
targets: [8],
visible: false,
searchable: false
}
],
select: {
style: 'os',
selector: 'td:first-child'
},
order: [[ 1, 'asc' ]]
} );
} );
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
solved on action:
dt.row({selected:true}).data()[8]);