Data Show With Checkbox In Grid


I want to show some data from a table in a grid with checkbox so that user can select check boxes and assign them to a person. It shows data but i want to assign checkbox id and i want to assign selected data on submit.

Here is my controller code:

	public function actionList()


		$model=new Tracking('search');

		$model->unsetAttributes();  // clear any default values









Here is my View Code:

List View

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



//	'filter'=>$model,


//		'stopPublish'=>array('name'=>'stopPublish', 'type'=>'raw', 'value'=>'CHtml::checkBox("stopPublish",$data->stopPublish,array("id"=>"chkPublish_".$data->id))'),

		'stopPublish'=>array('name'=>'stopPublish', 'type'=>'raw', 'value'=>'CHtml::checkBox("stopPublish","1",array("id"=>"chkPublish_2"))'),









)); ?>

Check your database for data. Your code seems fine.