Link In Yiistrap Gridview

Hi,

I want to use the following yiistrap gridview:


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

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

    'filter' => $person,

    'template' => "{items}",

    'columns' => array(

    array(

    'name' => 'id',

    'header' => '#',

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

    ),

    array(

    'name' => 'firstName',

    'header' => 'First name',

    ),

    array(

    'name' => 'lastName',

    'header' => 'Last name',

    ),

    array(

    '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?

Example:

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…


array("class"=>"CLinkColumn",

            "labelExpression"=>'$data->project_title',

	    "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(

                        ..........									

));

										

		$this->render('publiclists',array( 

			'dataProvider'=>$dataProvider,

                        'model' => $model

		));

			

	}