Hi,
In my controller function, I am adding a custom column called 'PC-MB', which doesnot exist in the database. The value is dynamically generated using other values in the row. Which works fine.
My question is - how do I make this column sortable. By default, it is not sortable.
Thanks
$this->load->library('grocery_crud'); $crud = new grocery_CRUD(); $crud->where('is_history',0); $crud->where('category',"HighwayStats"); $crud->set_table('hwdata'); $crud->order_by('last_update'); $crud->set_subject('Highway Data'); $crud->columns('name', 'last_update', 'PC-MB'); $crud->callback_column('PC-MB',array($this, '_totalpc_callback') ); $gcrud_output = $crud->render();