Ignited datatables always return only 100 rows.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Ignited datatables always return only 100 rows.. (/showthread.php?tid=57124) |
Ignited datatables always return only 100 rows.. - El Forum - 02-18-2013 [eluser]Tonko[/eluser] Hi all, I need your help. I have table where is 404 rows and I use ignited datatables library to show them. I have problem, because the ignited datatables library always return MAX 100rows But my controller show this: {"sEcho":0,"iTotalRecords":402,"iTotalDisplayRecords":402,"aaData" [and here is only 100 records, not all 404]... this is my jquery code in view: Code: var oTable = $('.mws-datatable-fn').dataTable( { and my controller: Code: $this->load->library('companies/datatables'); Ignited datatables always return only 100 rows.. - El Forum - 02-18-2013 [eluser]johnpeace[/eluser] Do you have the profiler turned on and displaying the queries that are being run? Code: $this->output->enable_profiler(TRUE); Use Firebug to check the POST request and make sure that iDisplayLength is being sent with the request (looks like the datatables library isn't finding it). Ignited datatables always return only 100 rows.. - El Forum - 02-18-2013 [eluser]Tonko[/eluser] I have figured it out by editing the function get_paging in datatables library:form Code: $this->ci->db->limit(($iLength != '' && $iLength != '-1')? $iLength : 100, ($iStart)? $iStart : 0); Code: $this->ci->db->limit(($iLength != '' && $iLength != '-1')? $iLength : 10000, ($iStart)? $iStart : 0); |