MyCButtonColumn template in yii2?

Hi all,

i want to use MyCButtonColumn in my view.php file for using templates…

by default it gives 3 buttons view,update & delete…but i want to display only update and delete button…

i have used MyCButtonColumn in yii 1.10 and but in yii2 dun knw…

please provide solution…


Try the following code snippet:

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



'filter'=&gt;&#036;model,	// comment this line to remove filters from grig view







			'template'=&gt;'{delete} {update}',



)); ?>

Thanks S@ndy,

i have done my code as

                ['class' => 'yii\grid\ActionColumn',

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

			 'controller' => '/batch',

			 'urlCreator' => function ($action, $model, $key, $index) {

			  if ($action == 'update') {

			     return $url = \Yii::$app->getUrlManager()->createUrl("batch/update?id=".$model->batch_id."&course=".$_REQUEST['id']);				




it works proper…

Thanks for the reply.