CGridView htmlOptions from model

Hello, guys.

Is there any way to pass variable from model get method to CGridView collumn htmlOptions?

I want to dynamicaly set <td title="some usefull desription"> value. So i made public method in my model:


Order model:

...

public function getCame_from() {

    return (isset($this->referer)) ? 'came from: '.$this->referer : 'direct';

}

and in my orders view, in CGridView i’m trying to set


'columns' => array(

    array(

        'name' => ''

        ...

        'htmlOptions' => array('title' => '$data->came_from')

        ....

But this don’t work and i have <td title="$data->came_from">

You can use "value" property, which evaluates PHP scripts like this:




...

columns => array(

   ...

   array(

     'name' => 'role',

     'value' => 'AdminHelper::getAuthRoleDesc($data->role)',

   ),

   ...

}



more examples:

http://www.yiiframework.com/forum/index.php?/topic/19466-cgrideview-and-custom-data/page__p__95523#entry95523

Unfortunely, value field already used for another variable, i need both: ‘value’ for <td>value</td>, and ‘came_from’ for <td title=“came_from”>value</td>