Link In Yiistrap Gridview


I want to use the following yiistrap gridview:

    <?php $this->widget('bootstrap.widgets.TbGridView', array(

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

    'filter' => $person,

    'template' => "{items}",

    'columns' => array(


    'name' => 'id',

    'header' => '#',

    'htmlOptions' => array('color' =>'width: 60px'),



    'name' => 'firstName',

    'header' => 'First name',



    'name' => 'lastName',

    'header' => 'Last name',



    'name' => 'username',

    'header' => 'Username',



    )); ?>

Yiistrap Reference

Its possible to have a column with an link to an action and attach the individual id for every person?


In the row of the user with id = 3 should stay an link to "index.php?r=person\edit&id=3"

In the row of the user with id = 4 should stay an link to "index.php?r=person\edit&id=4"

and so on…

I think you want this…



	    "urlExpression"=>'Yii::app()->createUrl("person/edit", array("id"=>$data->id))'),

Yeah, thank you that helps :)

But i need another advice:

I want to use a filter row on the head of the table:

i set the filter property like this:

‘filter’ => $model

there is a filter row displayed but if i try to filter for something (e.g. FirstName: jon) and press enter. Nothing happens. All rows are shown like before and not only the rows with firstname jon…

my action looks like this:

	public function actionMyAction()


	        $model=new Model('search');

		$dataProvider = new CActiveDataProvider(






                        'model' => $model