0

Hi good day;

Im working with Ignited Datatables and Im trying to add a callback on edit_column but it's no working it's not making the call just print the 3 parameter :

   $this->datatables->edit_column('value','$1','callback_esNulo(value,id)');

and this the function callback

  function esNulo($value,$id){
     $result= is_null($value) ?  "0" :  "1";
     echo $result;
    }

I hope can help me thanks ....

3
Contributors
9
Replies
46
Views
2 Years
Discussion Span
Last Post by Taywin
0

Maybe you should compare your format with this link. You may need to change the $this->datatables->edit_column to be more verbose that that...

0

the diference between the script is just the way im calling the object I have multiple :

   $this->datatables->select('id,value');
   $this->datatables->from('table');
   $this->datatables->edit_column('value','$1','callback_esNulo(value,id)');

I don't understand why it's just printing 'callback_esNulo(value,id)' at table..

0

Hmm.. If I see it correctly, on the page, it is ...

$datatables->select(...)->from(..)->edit_column(..., ..., ...);

0
$this->datatables->edit_column($column, $content, $match_replacement);

Was what I got from the github link which suggests that you need to place a match regex not a callback. Where did you get the references for a callback?

0

What is your this variable? Also, did you check if you really connect to the database?

Edited by Taywin

0

Hmm... difficult to sugest... But here... try adding public in front of your function as public function esNulo($value,$id) {?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.