Creating a new column in a GridView

I created a new column in a GridView filled for a description recovered through a join.

I build a method gridProdutoMarca($data,$row) in class ProductController to recover a description. But I’m not getting rename

the column for any name. When change the name the following error occurs

Property "Produto.Marca" is not defined.

OBS1: If I put the column name as idMarca the code works correctly. How can I rename this column?

OBS2: I followed the tutorial

http://www.yiiframework.com/wiki/278/cgridview-render-customized-complex-datacolumns/

OBS3: to add the column in gridView I inserted the code below in the GridView columns field


'columns'=>array(

		//'id',

		//'idMarca',

		'codReferencia',

		array(

            'name'=>'Marca',

			'type'=>'raw', //because of using html-code

            'value'=>array($this,'gridProdutoMarca'),  //call this controller method for each row

         ),

I got resolve

was enough include into the row below in gridView

array(

    'name' => 'Marca',


    'value' => '$data->Marca->nomeMarca',


    ),