Uneven Sorting in DataTable
Uneven Sorting in DataTable

My HTML is like below.
<table id="address_datatable" class="table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>Company Name</th>
<th>Contact Name</th>
<th>Email Address</th>
<th>Phone Number</th>
<th>Action</th>
</tr>
</thead>
<tbody>
My jQuery code is like below
$(document).ready(function() {
$('#address_datatable').DataTable({
"columnDefs": [ {
"targets": [ 0, 2 ],
"orderable": false
} ]
});
});
2 is working in "targets"
but 0 is not working.
I tried below example also. It is not working
$('#example').dataTable( {
"columnDefs": [ {
"targets": 'nosort',
"orderable": false
} ]
} );
Why it is happening like this ?
This discussion has been closed.
Replies
That's working for me here - http://live.datatables.net/huwihije/1/edit
Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin