Answer the question
In order to leave comments, you need to log in
How to configure global config for CGridView?
Hello everyone, tell me how to set up a global config for CGridView for buttons. I want the button template to be {edit} {delete} by default. I tried to do it in the config in the components, but it did not help. Well, accordingly, make your default buttons
'widgetFactory'=>array(
'widgets'=>[
'CGridView'=>[
'cssFile' => Yii::app()->request->baseUrl.'/protected/modules/admin/assets/css/gridview.css',
'itemsCssClass' => 'table table-striped table-bordered table-hover',
],
'CButtonColumn' =>[
'template' => '{edit} {delete}',
]
],
),
Answer the question
In order to leave comments, you need to log in
Derivate from CGridView , and already in your class specify the required parameters, also in addition to CGridView, you need to inherit from CButtonColum to solve your problem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question