Data loaded using server side script but filtering/sorting/etc done on client side
Data loaded using server side script but filtering/sorting/etc done on client side
dzida
Posts: 23Questions: 0Answers: 0
Hi all,
I have datatable created using this script:
[code]
$("table#offices-table").dataTable({
"oLanguage": {
"sUrl": "/site_media/language/pl_PL.txt"
},
"bProcessing": true,
"bInfo": false,
"bAutoWidth": false,
"bPaginate": false,
"sServerSide":true,
"bJQueryUI": true,
"sAjaxSource": "some-url",
"aoColumns": [
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
[/code]
This table is filled by proper data received from server, but when I use sort/filter feature there is no call to the server - sorting and filtering are done on client side.
I have also noticed that when 'some-url' is called for the first time it is done without parameters required by datatables.
I have datatable created using this script:
[code]
$("table#offices-table").dataTable({
"oLanguage": {
"sUrl": "/site_media/language/pl_PL.txt"
},
"bProcessing": true,
"bInfo": false,
"bAutoWidth": false,
"bPaginate": false,
"sServerSide":true,
"bJQueryUI": true,
"sAjaxSource": "some-url",
"aoColumns": [
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
[/code]
This table is filled by proper data received from server, but when I use sort/filter feature there is no call to the server - sorting and filtering are done on client side.
I have also noticed that when 'some-url' is called for the first time it is done without parameters required by datatables.
This discussion has been closed.
Replies
Try putting
[code]"bServerSide":true,[/code]
instead of
[code]"sServerSide":true,[/code]
BB
this works great now!