Server Side Datatable with Sorting,Searching and Pagination Using CodeIgniter – II

In previous codeigniter tutorial, Now we have action method in controller file which will fetch records from MySQL table using model method.

I am extending Part I tutorial of Datatable with Sorting,Searching and Pagination.We will create HTML view file and bind employee records data with jquery Datatable.

I will use some jQuery code to instantiate jQuery Datatable on target HTML table.I will also configure some jQuery Datatable parameters like sorting columns,url which will action method to access records, HTTP method POST/GET and data type JSON.

Step 5: Create employee.php in views/ folder, We will define all HTML layout in this file.

We have added jQuery datatables library into above file, Now we will call jQuery Datatable method on above '#table' table.

above code instantiated datatable on table and configured required parameters for listing.


We have created database connection with mysql.We learnt about how to create controller, model and view file into CodeIgniter.We have integrated jQuery datatable listing with sorting, searching and pagination using Ajax.

You can download source code from below link.

Leave a Reply

Your email address will not be published. Required fields are marked *