I am using [ignited datatable library](https://github.com/IgnitedDatatables/Ignited-Datatables/blob/master/application/libraries/Datatables.php) to display records from server side

This is my Controller 

```
<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Tryy extends CI_Controller {

     public function __construct()
    {
        parent::__construct();
        $this->config->load('category_rules');
        $this->load->library('Datatables');
        $this->load->model('category_model');

    }   

    public function index()
    {
        $this->load->view('admin/add_category1.php');
    }

    public function datatable()
    {
        $this->datatables->select('parent_category_id,parent_category_name')
        ->from('parent_category');
        echo $this->datatables->generate();
    }   

}

```

The datatable() in controller generated following array

```
{
"draw":0,
"recordsTotal":6,
"recordsFiltered":6,
"data":[
{
"parent_category_id":"22",
"parent_category_name":"Live"
},
{
"parent_category_id":"23",
"parent_category_name":"Work"
},
{
"parent_category_id":"24",
"parent_category_name":"Enjoy"
},
{
"parent_category_id":"25",
"parent_category_name":"Move"
},
{
"parent_category_id":"26",
"parent_category_name":"Study"
},
{
"parent_category_id":"27",
"parent_category_name":"Misc"
}
]
}

```

View file(admin/add\_category1.php)

```
<table class="table table-striped table-bordered table-hover" id="big_table">
 <thead>
 <tr>
 <th>parent category id</th>
 <th>parent category name</th>
 </tr>  
 </thead>  
 <tbody>
  <?php echo $this->table->generate(); ?>
 </tbody>
 </table>

<script type="text/javascript">
$(document).ready(function() {
    $('#big_table').dataTable( {
        "bProcessing": true,
        "bServerSide": true,
        "sAjaxSource": '<?php echo base_url('tryy/datatable'); ?>',
        "aoColumns": [
            { "mDataProp": "parent_category_id" },
            { "mDataProp": "parent_category_name" }
        ]
    } );
} );

</script>

```

Data is getting displayed but

Search ,sort,Show no of records drop down is not functioning 

[![enter image description here](https://i.stack.imgur.com/6ICsC.png)](https://i.stack.imgur.com/6ICsC.png)