Grid Name/title For Cgridview

Hi Everyone,

I’m having a bit of trouble with what I would have thought was a very simple task.

I’d like the name of the grid to display as something other than what it’s currently displaying as…

I can’t find any header/name/title attributes to do this.

Advice greatly appreciated.

Thanks!




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

				'id'=>'my_technique-grid',

		    	'emptyText' => 'No techniques listed.',

				'htmlOptions'=>array('title'=>'10%'),

				'dataProvider'=>$model->getDataProvider('myTechniques'), 

				'columns'=>array(

				array('name'=>'technique','value'=>'$data->technique->TECHNIQUE_SPECIALITY'),

		    		array(

						'class'=>'CButtonColumn',

						'template' => '{delete}',

						'htmlOptions'=>array('width'=>'10%'),

						'buttons'  => array(	

			                'delete' => array(

			                    'label'=>'delete',     // text label of the button

			                    'url'=>'Yii::app()->createUrl("/deleteTechnique", array("id" => "$data->TID","technique_id"=>"$data->T_ID"))', 

			                ),

			

				        ),

					),

				 )

				 

			));



Hi I dont really understand what you trying to achieve but here is what i think


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

                                'id'=>'my_technique-grid',

                        'emptyText' => 'No techniques listed.',

                                'htmlOptions'=>array('title'=>'10%'),

                                'dataProvider'=>$model->getDataProvider('myTechniques'), 

                                'columns'=>array(

                                array('name'=>'technique','value'=>'$data->technique->TECHNIQUE_SPECIALITY'),

                                array(

                                                'class'=>'CButtonColumn',

                                                'template' => '{delete}',

                                                'htmlOptions'=>array('width'=>'10%'),

                                                'header'=>'newheadername', // if you want to change the name of the header

                                                'buttons'  => array(    

                                        'delete' => array(

                                            'label'=>'delete',     // change the label text 

                                            'url'=>'Yii::app()->createUrl("/deleteTechnique", array("id" => "$data->TID","technique_id"=>"$data->T_ID"))', 

                                        ),

                        

                                        ),

                                        ),

                                 )

                                 

                        ));

EDIT:

here is link to the api

http://www.yiiframework.com/doc/api/1.1/CButtonColumn#buttons-detail