Demo of Dtable Library for Codeigniter and Datatables

Implementing datatables with server side pagination has always been a headache for developers but this codeinigter based library makes it extremely simple and efficient. Three examples demonstrate how to list records from, three, two and a single table respectively. You can clone or download the examples from Github [ ]. Follow these steps to make it work.>

  1. Create a new or use an existing codeigniter installation.
  2. Import SQL [].
  3. Put Dtable.php [] in application/libraries directory.
  4. Create a Controller [].
  5. Create a view [].
  6. Load the view in your in your controller. You will also need a new function in your controller, which will receive dtable pagination params and out the json format of required data.
  7. Include jquery and CDN libararies. You can use the following CDNs.
    1. JS:
    2. CSS: //
    3. CSS: //
    4. CSS:
    5. JS: //
    6. JS: //
    7. JS: //
  8. Views and controllers are explained briefly with every example.

This demo uses one codeigniter (Dtable) library, one view and one controller. The view contains HTML and JavaScript while the controller and a dtable library is used to output json data of records to be parsed by great Datatables JS Library . And of course, don't forget to include Jquery and Datables libraries. Also, include

If you have any question, you can email me at or you can create an issue on Github[]

DataTable Example

Item ID Name Colour Engine type Assembled Make



Now in controller named as "Vehicle" we will create a function "get_dtable_data".

DataTable Example2

Model ID Name Make



Now in controller we will create a function named as "get_dtable_data_exp_2".

DataTable Example3

Make ID Make Name



Now in controller we will create a function named as "get_dtable_data_exp_3".