Closed ilzat closed 8 years ago
$this->datatables ->select('objects.id, objects.creator_id, objects.obj_name_short') ->from('objects') ->join('users','users.id=objects.creator_id','left') ->select('surname') <---- you are using this one for?? ->add_column('buttons', 'Hello World'); <--- echo $this->datatables->generate();
I am showing an example to use add_column ->add_column('acciones', '$1', "cuentas.id"
maybe this can help you
1 year later... I solved this issue modifying the conditional on L313
if ($mColArray[$i]['searchable'] == 'true' && !array_key_exists($mColArray[$i]['data'], $this->add_columns))
Hello, i used to:
table loading, but does not work when searching error output:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: buttons
Filename: libraries/Datatables.php
Line Number: 322
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at Z:\home\sd2\www\system\core\Exceptions.php:185)
Filename: core/Common.php
Line Number: 440
And My JS code: $(document).ready(function() { $('#datatable').dataTable( { "processing": true, "serverSide": true, "ajax": { "url": "/dashboard/getObjectsByAjax", "type": "POST" }, "columns": [ { "data": "id" },
{ "data": "creator_id" }, { "data": "obj_name_short" }, { "data": "surname" }, { "data": "buttons" } ]
} );
please help me