I have ItemController and in actionView I put gridview of my Itempicture, and I want when I click on icon view, update and delete then go to ItempictureController.
so How to change controller action in gridview with different controller?
I have ItemController and in actionView I put gridview of my Itempicture, and I want when I click on icon view, update and delete then go to ItempictureController.
so How to change controller action in gridview with different controller?
Try this:
https://github.com/yiisoft/yii2/blob/master/docs/guide/output-data-widgets.md#action-column
In your gridview,add like
Hope this will work!
You need to set $controller property of yii\grid\ActionColumn. In your case, try this:
http://www.yiiframework.com/doc-2.0/yii-grid-actioncolumn.html#$controller-detail
If you are using yii\data\ArrayDataProvider, make sure you set $key property like:
$dataProvider->key = 'id'; //id is the primary key name of your Itempicture model.
http://www.yiiframework.com/doc-2.0/yii-data-arraydataprovider.html#$key-detail
Hope it helps.