bSortable columnDefs not working

bSortable columnDefs not working

baokydevbaokydev Posts: 3Questions: 3Answers: 0
$(document).ready(function() {
    var dt = $('#example').DataTable( {
        "processing": true,
        "serverSide": true,
        "ajax": "api.php?t=clients",
"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [0] }
],
        "columns": [
{ "className": "details-control" , "data": null , "defaultContent": "   "},
{ "data": "c_name" },
{ "data": "c_number" },
{ "data": "c_link" }
]
    } );

My code throw an error of SQL access violation when I included the following with

"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [0] }
]

But if i remove it, everything works fine, basically I just want disable sorting for column 0

How do I achieve it.

Thanks!!

This discussion has been closed.