i am using jquery data table with server side process. i dont want to use sort by column feature of it so i have not done anything for sorting at server. it works well but the problem is whenever i click any header of column it fire event and send request to server. i dont want this to be happen. how can i stop that event..
jquery:
var table= $('#datatable').DataTable({
columns: [
{ 'data': 'Id' },
{ 'data': 'Name' },
{ 'data': 'Address' }
],
bServerSide: true,
sAjaxSource: '/Test/Student.asmx/Get',
sServerMethod: 'post'
});
put this code in datatable js function..
var oTable_Data = $('#id').dataTable(
{
"language": {
"sSearch": '',
"searchPlaceholder": "Search"
},
"aaSorting": [],
"bPaginate":true,
"bLengthChange": false,
"bFilter":true,
"bDestroy":true,
"bInfo": false,
"aoColumns":[{"bSortable": false}]
});
"aaSorting": [ ] will disable automatic sorting..
"aoColumns":[{"bSortable": false}] will remove sorting.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.