A
A
asferot2018-12-03 17:12:38
Yii
asferot, 2018-12-03 17:12:38

How to solve problem with kartik-v/yii2-export?

There was a problem with kartik-v/yii2-export.
Without

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

An error appears
5c05392a25bf8772482951.png
indicating
'modules' => [
    'gridview' => [
        'class' => '\kartik\grid\Module',
    ],
 ],

Another error occurs
5c0539568b2ed409608366.png
What to do?
view code
<?php echo ExportMenu::widget([
    'dataProvider' => $dataProvider,
    //'columns' => $gridColumns,
    'dropdownOptions' => [
        'label' => 'Export All',
        'class' => 'btn btn-secondary'
    ]
]) . "<hr>\n".
GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
      ['class' => 'kartik\grid\SerialColumn'],
      'Invoice',
      'Date'
  ],
]); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-12-03
@webinar

I think the problem is either in the nesting in the config or in the Russian symbol or something like that
Check the config more carefully. rewrite the module declaration. I'm sure it's not the same as you gave in the question. Otherwise there would be no error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question