php - Yii2 Export redirects to destination page -


i'm implementing export function our yii2 based application. (an humhub module) use "kartik-v/yii2-export" module.

the action contains:

$gridcolumns = [   ['class' => 'yii\grid\serialcolumn'],   'id',   'language',   'time_zone',   ['class' => 'yii\grid\actioncolumn'], ];  $dataprovider = new sqldataprovider([   'sql' => 'select * user status=:status' ]);  return $this->render('export',[   'dataprovider' => $dataprovider,   'gridcolumns' => $gridcolumns ]); 

the view contains:

echo exportmenu::widget([         'dataprovider' => $dataprovider,         'columns' => $gridcolumns     ]); 

when klick on export function new popup windows opens information creates file now. after few seconds should start download, redirects destination page.

do need add controller or did else wrong?

thanks help.

it's not defined if need "exportrequestparam" needs set.

echo exportmenu::widget([   'dataprovider' => $dataprovider,   'columns' => $gridcolumns,   'exportrequestparam' => 'user' ]); 

this way works.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -