I am working Jquery data table where I need to sorting icon and sorting/search false for one column
Here is my code
$(document).ready(function () {
$('#tblUsers').DataTable({
"searching": true,
"ordering": true,
"pagingType": "full_numbers",
"ajax": "GetUsers",
"columnDefs": [{
"targets": 0,
"data": "Id",
"orderable": false,
"searchable": false,
"render": function (data, type, full, meta) {
return '<a href="MangeUser/' + data + '">Edit User</a>';
}
}],
"columns": [
{
"data": "Id"
},
{ "data": "FirstName" },
{ "data": "LastName" },
{ "data": "UserName" },
{ "data": "RoleName" }
]
});
});
and html is as below
<table id="tblUsers" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>FirstName</th>
<th>LastName</th>
<th>Email Id</th>
<th>RoleName</th>
</tr>
</thead>
</table>
Now even after setting orderable/searchable to false its still showing when page is loaded first time but when I click somewhere else then icon is gone
