ivan martinez
ivan martinez

Reputation: 196

Yii2 kartik GridView " The 'gridview' module MUST be setup in your Yii configuration "

I have the next trouble,

The gridview module MUST be setup in your Yii configuration file and must be an instance of kartik\grid\Module.

I don't know how to configure my config file. In my config file, I have this:

'modules' => [

        'gridview' => ['class' => 'kartik\grid\Module']
    ],

but this not found

Upvotes: 4

Views: 8403

Answers (4)

Suco Alaranjado
Suco Alaranjado

Reputation: 13

'dynagrid' =>  [
    'class' => '\kartik\dynagrid\Module',
    // other settings (refer documentation)
],
'gridview' =>  [
    'class' => '\kartik\grid\Module',
    // other module settings
],

Reference

Upvotes: -1

aslanimanesh
aslanimanesh

Reputation: 1

backend or frontend -> config -> main.php

'modules' => ['gridview' => ['class' => 'kartik\grid\Module']],

Upvotes: -1

Amin Shafiee
Amin Shafiee

Reputation: 425

Try this in your config file:

'modules' => [
    'gridview' =>  [
        'class' => '\kartik\grid\Module',
    ],
],

Upvotes: -1

ivan martinez
ivan martinez

Reputation: 196

The solution is agregated the line modules over the same herarchy like this:

'components' => [
      ],
'modules' => [
     'gridview' => ['class' => 'kartik\grid\Module']
] 

Upvotes: 11

Related Questions