![]() |
Ignited Datatables - display the records on the table - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Ignited Datatables - display the records on the table (/showthread.php?tid=63052) |
Ignited Datatables - display the records on the table - Lykos22 - 09-21-2015 Hi I'd like some help please. I'm using Ignited Datatables to display posts in tabular way in my view. I've been struggling hole weekend in order to do this working correct, but I can't understand what or if I'm doing something wrong. This is the function that fetches the tabular data in my Post model PHP Code: /** Then in my posts controller I call the get_datatable() PHP Code: /** And this is my view Code: <table class="table dataTable table-bordered" cellspacing="0" width="100%"> And this is my script PHP Code: <?php if(isset($datatables)): ?> Any help would be appreciated. RE: Ignited Datatables - display the records on the table - salain - 09-21-2015 Hi, You need to change your controller to this to work: PHP Code: public function index() { RE: Ignited Datatables - display the records on the table - Lykos22 - 09-22-2015 (09-21-2015, 10:38 PM)salain Wrote: Hi, Thank you for your reply. I 've done some changes on my code so you can review it PHP Code: ** I've put it on a separate function, as you said before but still same thing RE: Ignited Datatables - display the records on the table - Lykos22 - 09-23-2015 Ok I have managed to display records on the screen but the rest functionality of the datatables doesn't seem to work. I can get all records and not the first 10 by default, the pagination, the Search and the sorting (asc or desc) of each col is not working, and also showing more than 10 records. This is my code updated PHP Code: // model |