⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

relation_n callback_column !!



josepichu
  • profile picture
  • Member

Posted 23 March 2012 - 09:24 AM

Hi!

First of all i will describe my data situation to understand it better:

I have a table called for example table1(idtable2...etc.) and table2 (table2_name).

I have done a simple relation like this:


$this->grocery_crud->set_relation('idtable2','table2 ','table2_name');


And it looks perfectly in the list, but i want to assign a callback_column function like this:


$this->grocery_crud->callback_column('idtable2',array($this,'table_name'));


function table_name($value, $row)
{
echo "hi..";
}



But it doesn't work ! i tried to use this: $this->grocery_crud->callback_column('table2_name',array($this,'table_name')); , but it does not work!

What's happend ?

Regards.

josepichu
  • profile picture
  • Member

Posted 26 March 2012 - 12:25 PM

nobody understand me? :(

manny
  • profile picture
  • Member

Posted 28 March 2012 - 00:23 AM

[quote name='josepichu' timestamp='1332494666' post='894']


function table_name($value, $row)
{
echo "hi..";
}



[/quote]

r u sure about 'echo'? seems like it should be 'return' instead =)

bl4z
  • profile picture
  • Member

Posted 29 March 2012 - 10:18 AM

/topic/254-set-relation-breaks-processing-of-field-with-same-name-returned/page__view__findpost__p__982