Remove buttons from cgridview

I don’t want the delete and update buttons to be shown in the cgridview.

How can I achieve that?

use template in buttons column and have it as


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










         'template' => '{view}',


)); ?>

Thanks that solved it

how about removing ‘delete’ and ‘edit’ buttons on certain rows only?

You can use the visible property :






      'buttons' => array(

         'delete' => array(

            'visible' => 'strlen($data->trackingnumber)>0',