How To Add A Static Row And How To Disable Checkbox In Cgridview

Hi All,

I have the following CGridView:




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

            	'id'=>'cause-grid',

            	'type'=>'striped',

            	'itemsCssClass'=>'items grid-bordered',

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

            	'emptyText'=>'',

            	'showTableOnEmpty'=>false,

		'hideHeader'=>true,

		'selectableRows'=>1,

		'selectionChanged'=>'selectionChange',

            	'columns'=>array(

				    array(

					    'id'=>'id',

					    'class'=>'CCheckBoxColumn',

						//'disabled'=>'Cause::getRowDisable($data->donCount, $data->limit)',

					),

            		array('type'=>'html',

            		      'value'=>'Cause::getListColumnPrice($data->amount, $data->donCount, $data->limit, $data->fee, $data->type, $data->cause_id)',

            	    ),

            		array('type'=>'html',

            		      'value'=>'Cause::getListColumnDescription($data->description, $data->date, $data->id)',

            		),

            	),

            	'template'=>"{items}\n{pager}",

            	'pagerCssClass'=>'pager',

            ));



First thing… I need to disable the posibility to select and check some rows, so that’s why I thought that using this would work:




'class'=>'CCheckBoxColumn',

						'disabled'=>'Cause::getRowDisable($data->donCount, $data->limit)',

					),



But I get an error: Property "CCheckBoxColumn.disabled" is not defined.

Does someone know how to disable the checkbox?

Another question… I bring the data from DB, but I need to add a first row with static data (hardcode), the grid shows options to allow the user select one, but I want to give the possibility to not choose any of the options brought from DB. I have been looking for this on yii website and here in the forum but I haven’t found anything, is it possible?

Thanks in advance!