Class inside render function for column in datatable
Class inside render function for column in datatable
omerabbasi78
Posts: 17Questions: 7Answers: 1
Consider following
var table = $("#tbl").DataTable({
ajax: "/api/xyz/2",
columns: [
{
data: 'abc',
render: function (data, type, row, meta) {
if (parseInt(meta.row) == 0 || parseInt(meta.row) == 1) {
//Is it possible to apply Class here to column?
}
return "" ;
},
}],
});
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
did it like following
but i would like to enhance my question... how can I disable keys on the same cells on which I've applied class??
By "keys" do you mean KeyTable? Currently there isn't a way to do that on a cell by cell basis. You can do it on a column basis using
keys.columns
.Allan