Global search is not working with "bServerside=true"...only on one specific table!!
Global search is not working with "bServerside=true"...only on one specific table!!
Below is the code:
var oTable = $('.dataTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"bStateSave": false,
"sAjaxSource": "<?php echo $this->Html->url(array('controller' => 'Students', 'action' => 'index', '?' => array('model' => 'Student'))); ?>",
"bAutoWidth": false,
"bDeferRender": false,
"sPaginationType": "full_numbers",
"aLengthMenu": [[50, 100, 200], [50, 100, 200]],
"iDisplayLength": 50,
"oSearch": {"bSmart": false},
"oLanguage": {
"sProcessing": "Processing Data...",
"sLengthMenu": "Display _MENU_ records"
},
"aoColumnDefs": [
{"sType": "numeric", "aTargets": [0]},
{"bVisible": false, "aTargets": [3, 9]},
{"bSearchable": true, "aTargets": [0, 1, 2, 4, 5, 6, 7, 8]},
{"iDataSort": 2, "aTargets": [3]},
{"iDataSort": 8, "aTargets": [9]}
]
});
I'm using datatables plugin on a cakephp website and whats driving me crazy is that these same exact settings when used with a different model (table) they are working just fine!!
But on this model (students) global search always returns ALL records without any filtering, except when I disable serverSide!
Any ideas on how to debug the reason for the problem on the server side??
what could be the problem? and how to check it out?
I compared my Cakephp models, views, and even the database tables to find why its working with all other tables/models except this one but no luck!
Any help will be greatly appreciated..
P.S. Datatables plugin 1.9, PHP 5.5, jQuery 1.9