Help with values in cgridview

Hi,

I have this cgridview, and I need a link to the update page for every id in the grid.

Here’s part of my code:


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

	'id'=>'vlln-afw-grid',

	'dataProvider'=>$model->search(),

	//'filter'=>$model,

	'columns'=>array(

		//'afwId',

		//'stamboeknummer',

		//'tagId',

		array(

'class'=>'CLinkColumn',

'label'=>'id_post_author',

'url'=>'/testyii/index.php/vLlnAfw/update/'.,

'header'=>'Author'

),

What I can’t figure out is how to append the value I would normally get in the ‘afwId’ column, to the end of the url column.

I kinda need it to work so that the url for every row becomes something like

‘url’=>’/testyii/index.php/vLlnAfw/update/’ .$afwId,

How do I do that?

Thank you.

To get the value of the afwld column you would use $data->afwld… as $data refers to the data model for the row - http://www.yiiframework.com/doc/api/1.1/CButtonColumn#buttons-detail

but

it’s not a good idea to write manual URLs… it’s better to use createUrl() - http://www.yiiframework.com/doc/api/1.1/CController#createUrl-detail