I'm trying to insert an empty row at the top of the table with the yii2-kartik\gridview, so that I can add custom components to each column.
I would like the result to be as follows in the print:
So far I've only managed to insert this line by adding the
filterModel
:
<?php
$gridViewPesquisaPonto = GridView::widget([
'moduleId' => 'gridview',
'dataProvider' => $pesquisaPontodataProvider,
'filterModel' => true, // The table row containing the filters is configured here
'layout' => "{items}{summary}{pager}",
'captionOptions' => ['class' => 'text-wrap'],
'options' => [
'id' => 'grid-pontos-pesquisa',
],
'columns' => [
// ...
However, this line is exclusive for the use of filters implemented by the gridview. I would like to know a way to insert a line so that I can edit it freely (If you have the link to the documentation that contains this answer, please post in the answer, as I haven't found it yet).