I have a fair simple datatable with id in the first column, checkbox at the second column.
The first column invisible and the second column (the checkbox disappear), so the first load the sorting arrow is disappear with this setting
$('#example').dataTable({
"bRetrieve": true,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0] },
{ "bVisible": false, "aTargets": [0] },
{ "bSortable": false, "sSortDataType": "dom-checkbox" , "aTargets": [1] }
]
});
My checkbox in the html is simply like that
<td>
<input data-evid="{$T.post.Id}" type="checkbox" {#if $T.post.selected == true}checked="checked"{#/if} />
</td>
However, after the sorting.
The sorting arrow for the check box column appears again.
The first column invisible and the second column (the checkbox disappear), so the first load the sorting arrow is disappear with this setting
$('#example').dataTable({
"bRetrieve": true,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0] },
{ "bVisible": false, "aTargets": [0] },
{ "bSortable": false, "sSortDataType": "dom-checkbox" , "aTargets": [1] }
]
});
My checkbox in the html is simply like that
<td>
<input data-evid="{$T.post.Id}" type="checkbox" {#if $T.post.selected == true}checked="checked"{#/if} />
</td>
However, after the sorting.
The sorting arrow for the check box column appears again.