Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81689

Sorting with checkbox as the first column

$
0
0
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.

Viewing all articles
Browse latest Browse all 81689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>