Hello.
First of all, GREAT framework and thanks for all the work put in to it and all the advice given by those knowledgeable of Yii.
I am using the advanced template and created some paged using CRUD.
On the GridView created I started to experiment with it and change some column configurations.
I started with changing the column width and it worked but then I lost the column title.
So I added the value attribute and it reappeared but with no sort link.
How do I go about reaquiring the column title with it’s sort ability?
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'class' => 'yii\grid\SerialColumn',
'headerOptions' => ['style' => 'width:40px']
],
'id',
[
'value' => 'longName',
'header' => 'Long Name',
'headerOptions' => ['style' => 'width:200px']
],
'shortName',
'website',
'lastUpdate',
// 'sortOrder',
// 'insertDate',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
Thanks
Scotty