How To Remove Delete Button In Cgridview

Hi All

I need to remove delete button on my CGridView ?

How to do that , I know how to add new button but need to edit basic button ??





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

	'id'=>'users-grid',

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

	'filter'=>$model,

	'columns'=>array(

		'user_id',

		'en_username',

		'ar_username',

		'email',

        array(

                       'name'=>'status',

                       'type'=>'html',

                       'value'=>'$data->getStatus($data->status)',




                ),


        







		array(

			'class'=>'CButtonColumn',  /// here I need to edit or remove delete button 

                                 

		),

        

       array

(

    'class'=>'CButtonColumn',

    'template'=>'{active} {inactive}',

    'buttons'=>array

    (

        'active' => array

        (

            'label'=>'Active User Account',

            'imageUrl'=>Yii::app()->request->baseUrl.'/images/active.png',

            'Visible'=>'$data->status =0 ',

            'url'=>'Yii::app()->createUrl("usersmangment/active", array("id"=>$data->user_id))',

        ),

          'inactive' => array

        (

            'label'=>'INActive User Account',

            'imageUrl'=>Yii::app()->request->baseUrl.'/images/inactive.png',

            'Visible'=>'$data->status =0 ',

            'url'=>'Yii::app()->createUrl("usersmangment/inactive", array("id"=>$data->user_id))',

        ),

        

        

        

    ),

),

        

	),

));




Thanks in advance

modify your code to something as following


 array(

                        'class'=>'CButtonColumn',  /// here I need to edit or remove delete button

                ),

to


 array(

                        'class'=>'CButtonColumn',  /// here I need to edit or remove delete button

 

                         'template' => '{update}{view}',

                ),

:) OK so I can modify it like add new one .

Thank you alirz23 to your fast answer , you are the best :) .

shot bro no problem we are here to help