extend CGridColumn

I want to extend the CGridColumn so depending on the user who is log in not to be seen the update etc buttons.

I make this but now no buttons are there what is wrong?




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

	'dataProvider'=>$dataProvider,

	'columns'=>array(

		

		'CUSTOMER_NAME',

		array(

			'class'=>'application.components.MyButtonColumn',

		),

	),

));

......

class MyButtonColumn extends CGridColumn{

  //  public $template='{view} {update} {delete}';

   public function init()

	{  

     //  if (Yii::app()->user->name!='admin')

          //     $this->template='{view} {update} {delete} ';

     parent::init();

   }

}

You need to call parent::init() first.

I solve it.

Thank you. :rolleyes:

I am happy working with Yii