Kartik's yii2-grid: Setting unknown property: kartik\grid\GridView::panel

Antonio López

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 ' => [
        '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 ' => [

try remove it

   'panel' => [

Collected from the Internet

Please contact javaer1[email protected] to delete if infringement.

edited at


Login to comment


yii2 : how to keep the url same in kartik grid view?

Yii2 Login from DB (Setting unknown property: app\models\User::password_hash)

Yii2 - Getting unknown property: yii\console\Application::user

Yii2 Invalid Call: Setting read-only property

Setting unknown property: yii\web\UrlRule::GET

Getting unknown property Exception in yii2

Add filter property to Yii2 yii\grid\ActionColumn class

Setting unknown property: yii\grid\GridView::export

Not load kartik's select2 as filter in GridView. Yii2

Yii2 migrate Setting unknown property: yii\caching\FileCache::backuprestore

Eerror in social login in Yii2: Setting unknown property: yii\web\Application::authClientCollection

Yii2 Setting read-only property

Setting unknown property: yii\validators\NumberValidator::0

Yii2 datepicker in kartik gridview not working

Using property of parent class gives "unknown property" error in php (yii2)

kartik fileinput error in yii2

Unknown Property and programatically adding textfields in Yii2 form

Setting unknown property: yii\console\ErrorHandler::errorAction on linux server

Trying to get property of non-object while using kartik-v for image uploading in Yii2

Yii2: Using TinyMCE into Kartik's DetailView with custom settings

Yii2 Setting unknown property: yii\filters\auth\HttpBearerAuth::formats

Yii2: Kartik's DetailView and Select2 loading id's not text

YII2 : kartik Select2

Change pagination kartik yii2

PageSummary is not working in kartik GridView in yii2

Kartik's star-rating widget not working in foreach construction in Yii2

Undefined variable: dataProvider in yii2 kartik grid

Can't upload files larger than 97.66 KB in Yii2 Framework with Kartik's FileInput widget

Yii2 - Getting unknown property: yii\console\Request::userAgent and Class db does not exist