yii - Yii2 - Export Kartik-v -
i have many tables can displayed in yii2. 1 of them this:
we can download table clicking download button. many tables can download 1 one. 1 table can download table. actually, want of tables can downloaded in 1 file. want ask: there way download of tables , make them on 1 document?
here view code:
<?php use yii\helpers\html; use kartik\grid\gridview; use yii\widgets\pjax; use yii\bootstrap\model; use yii\helpers\url; use kartik\export\exportmenu; /* @var $this yii\web\view */ /* @var $searchmodel app\models\temppelamarmagisterjk */ /* @var $dataprovider yii\data\activedataprovider */ $this->title = yii::t('app', 'pelamar magister berdasarkan jenis kelamin'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="tempppelamarmagisterjk-index"> <h1><?= html::encode($this->title) ?></h1> <?php // echo $this->render('_search', ['model' => $searchmodel]); ?> <p> <!--<?= html::a(yii::t('app', 'create jumlah pelamar magister'), ['create'], ['class' => 'btn btn-success']) ?> --> </p> <?php $gridcolumns =[ 'tahundaftar', 'lakilaki', 'perempuan', 'tidakdiketahui', 'total' ]; //renders export dropdown menu echo exportmenu::widget([ 'dataprovider' => $dataprovider, 'columns' => $gridcolumns, 'fontawesome' => true, ]); ?> <?= gridview::widget([ 'dataprovider' => $dataprovider, 'filtermodel' => $searchmodel, 'columns' => [ ['class' => 'yii\grid\serialcolumn'], 'tahundaftar', 'lakilaki', 'perempuan', 'tidakdiketahui', 'total', ////['class' => 'yii\grid\actioncolumn'], ], ]); ?> </div>
thanks
Comments
Post a Comment