How can set a row to unselectable with row data value?
How can set a row to unselectable with row data value?
var columns = [
{
data: null,
defaultContent: '',
className: 'select-checkbox',
orderable: false,
target: 0
},
{ title: a', data: 'a', targets: 1 },
{ title: 'b', data: 'b', targets: 2 },
{ title: 'c', data: 'c', targets: 3 },
{ title: 'c', data: 'd', targets: 4 },
.....
_correctFormDataTable = $('#CorrectFormTable').DataTable({
dom: "Bfrtip",
data: $.map(_model, function (value, key) {
return value;
}),
columns: columns,
select: {
style: 'mutli',
selector: 'td:first-child'
},
bFilter: false,
bInfo: false,
buttons: [] ]
....
Answers
I Found it,
_correctFormDataTable.on('select.dt', function (e, dt, type, indexes) {
indexes.forEach(function (i) {
//console.log();
var data = _correctFormDataTable.row(i).data();
if (data.status === 1 || data.status === 3 )
{
_correctFormDataTable.row(i).deselect();
}
})
});