Adding checkbox on title
Adding checkbox on title
Hi,
I would like to have a column with checkbox and also have a checkbox on the header of the column to select all.
In my table I render headers using columnDefs.title. so for checkbox column my column definition is:
{"targets": "no-sort",
"orderable": false,
"data": "",
"title": "<input type='checkbox' class='row-checkbox editor-active'><span class='icon'</span>",
"render": function (data, type, full, meta) {
return "<input type='checkbox' class='row-checkbox editor-active'><span class='icon'</span>";
}
}
But I'm getting unknown parameter 0 for row 0. and other columns are rendered but not checkbox column. Any clue what's wrong in my code?
Answers
I removed 'no-sort' target and put 0 and it worked in terms of rendering but the sorting arrow is showing and when I click on sorting the other column I got the same error as above. how to fix that?