Hi, I have a CGridView with some columns,
I added a CGridColumn to the existing one, because I want a special column for my actions.
The problem is that the special variable $data doesn’t retrive any value, except for “id” field !
this is my code:
array(
'class' => 'CButtonColumn',
'header' => Yii::t('app','Generar'),
'template'=>'{generate}',
'buttons'=>array(
'generate' => array(
'label'=>$data->mes_calendario.Yii::t('app','Generar Cuota Mes '.$row[1]),
'imageUrl'=>Yii::app()->request->baseUrl.'/images/money.png',
'url'=>'Yii::app()->createUrl("cuota/generate", array("def_cuota"=>$data->id))',
),
),
),
It supose that $data->mes_calendario should return a value, I have this attribute as a column in the Grid and works fine.
Also the URL option work perfect, so I get the url with the paranmeters.
I have several (3) CButtonColumns in the grid .
That could be a problem ?
What I’m doing wrong ?
$data->mes_calendario is in the grid:
'columns' => array(
//'fkCuotaDefAnual',
'descripcion',
//'mes_calendario',
array('name'=>'mes_calendario','htmlOptions'=>array('style' => 'text-align: center;')),
array('name'=>'tipo_cuota','htmlOptions'=>array('style' => 'text-align: center;')),