Help with values in cgridview


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(














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 -


it’s not a good idea to write manual URLs… it’s better to use createUrl() -