Link in Cgridview with variable outside $data

Hi, I have a CGridView on one of my views that uses a $model. So what I mean is that the view shows all the info from the model and the grid shows relational data. Now my question is, how do I access data from the $model that its outside of the CGridView data? here is my code:


$dataProvider=new CActiveDataProvider('Asignaciona', array(


                        'condition'=>'codigoal = \''.$model->Codigo.'\'',






                $this->widget('zii.widgets.grid.CGridView', array(













How do I access the $seccion var?? I have tried to do it directly to the model but doesnt work either.


I have the same doubt/need. Help will be appreciated twice =)

'urlExpression' => 'array("materias/view", "id" => $data->codigom, "codigo" => "' . $seccion . '")',

Thanks kphtamas, works like a charm!