Jaya Kumari Jaya Kumari - 4 months ago 25
CSS Question

how to change actioncolumn heading and font color on index page in yii2

that is my code for color changing in index

[
'class' => 'yii\grid\ActionColumn',
'contentOptions' => ['style' => 'width:100px;'],
'header'=>'Actions',
],

Answer

You can use headerOptions property of ActionColumn Class

[
   'class' => 'yii\grid\ActionColumn',
    'contentOptions' => ['style' => 'width:100px;'],
    'header'=>'Actions',
    'headerOptions' => [
         'style' => 'color:red'
     ] 
],

ActionColumn ApiDoc