For the life of me, I'm unable to sort the following error out when using Kartik's yii2-grid:
Setting unknown property: kartik\grid\GridView::panel
My code is:
use yii\helpers\Html;
use kartik\grid\GridView;
[...]
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'hover' => true,
'persistResize' => true,
'pager' => [
'firstPageLabel' => Yii::t('app', 'Inicio'),
'lastPageLabel' => Yii::t('app', 'Final'),
'maxButtonCount' => Yii::$app->params['numBotones'],
],
'panel ' => [
'heading'=>'<h1>'.Html::encode(mb_strtoupper($this->title)).'</h1>',
],
'columns' => [
['class' => 'kartik\grid\SerialColumn'],
[...]
However, hover
and persistResize
do work.
Also my composer.json
contains:
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"yiisoft/yii2-jui": "*",
"kartik-v/yii2-grid": "@dev",
"kartik-v/yii2-mpdf": "@dev",
"kartik-v/yii2-widgets": "*",
"2amigos/yii2-tinymce-widget" : "*",
"sjaakp/yii2-illustrated-behavior": "*",
"dektrium/yii2-user": "0.9.*@dev",
"dektrium/yii2-rbac": "[email protected]"
},
Any ideas?
seems you have a blank in the attribute 'panel '
'panel ' => [
'heading'=>'<h1>'.Html::encode(mb_strtoupper($this->title)).'</h1>',
],
try remove it
'panel' => [
'heading'=>'<h1>'.Html::encode(mb_strtoupper($this->title)).'</h1>',
],
Collected from the Internet
Please contact javaer1[email protected] to delete if infringement.
Comments