kartik-v / yii2-dynagrid

Turbo charge the Yii 2 GridView with personalized columns, page size, and themes.
http://demos.krajee.com/dynagrid
Other
74 stars 66 forks source link

why Setting unknown property: kartik\dynagrid\DynaGridDetail::moduleId? #179

Closed callmedavron closed 6 years ago

callmedavron commented 6 years ago

I did everything according to the documentation, and I can not understand what I'm doing wrong. screennnshotttt

first i setup in modules 'modules' => [ 'dynagrid' => [ 'class' => '\kartik\dynagrid\Module', // other module settings ], 'admin' => [ 'class' => 'app\modules\admin\Module', ], 'gridview' => [ 'class' => '\kartik\grid\Module', ], ],

my code = from documentation

`use kartik\widgets\DynaGrid; use kartik\grid\GridView; $columns = [ ['class'=>'kartik\grid\SerialColumn', 'order'=>DynaGrid::ORDER_FIX_LEFT], 'id', 'name', [ 'attribute'=>'publish_date', 'filterType'=>GridView::FILTER_DATE, 'format'=>'raw', 'width'=>'170px', 'filterWidgetOptions'=>[ 'pluginOptions'=>['format'=>'yyyy-mm-dd'] ], ], [ 'class'=>'kartik\grid\BooleanColumn', 'attribute'=>'status', 'vAlign'=>'middle', ], [ 'class'=>'kartik\grid\ActionColumn', 'dropdown'=>false, 'order'=>DynaGrid::ORDER_FIX_RIGHT ], ['class'=>'kartik\grid\CheckboxColumn', 'order'=>DynaGrid::ORDER_FIX_RIGHT], ];

echo DynaGrid::widget([ 'columns'=>$columns, 'storage'=>DynaGrid::TYPE_COOKIE, 'theme'=>'panel-danger', 'gridOptions'=>[ 'dataProvider'=>$dataProvider, 'filterModel'=>$searchModel, 'panel'=>['heading'=>'

Library

'], ], 'options'=>['id'=>'dynagrid-1'] // a unique identifier is important ]);`

kartik-v commented 6 years ago

You have not updated your packages via composer and probably manually tried to update this extension. Hence you are facing the issue. Always update extension packages via composer ensuring the right dependencies are loaded. You seem to have an outdated version of a dependency yii2-krajee-base for yii2-dynagrid... - that is why you are facing this issue.

callmedavron commented 6 years ago

@kartik-v thank you very much, i understand !!!