I’ve got multiple views using the same table, except that they are filtered, which means I can’t change it through the model label. I tried renaming the header to rename the display, however, it disabled the sorting ability. How do I rename the header without disabling the sorting?
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'header' => 'Description',
'attribute' => 'column_c',
'format' => 'text',
],
[
'header' => 'Days',
'attribute' => 'column_d',
'format' => 'text',
],
['class' => 'yii\grid\ActionColumn'],
],
]); ?>