Export Menu Demo Configure Files Link

A variation of large files linking scenario where you can control the linkPath and move internally the generated file from the temporary folder to your target link location. You can use and setup the onGenerateFile Closure callback to manage this movement. It also configures the deleteAfterSave property to true to automatically delete the saved files on the server folder after its been linked via the linkPath.

Showing 1-5 of 20 items.
#IDNameAuthorColorPublish DateStatusBuy AmountSell AmountActions
11The Great GatsbyF. Scott Fitzgeraldblue2016-04-01209.004,000.00
22The Grapes of WrathJohn Steinbeckred1995-07-1834.00105.50
33Nineteen Eighty-FourGeorge Orwellorange1984-02-2789.0078.50
44UlyssesJames Joycegreen1974-12-1079.0058.50
55LolitaVladimir Nabokovpink2004-05-09108.0095.50
use kartik\export\ExportMenu;
use kartik\grid\GridView;
echo ExportMenu::widget([
    'dataProvider' => $dataProvider,
    'columns' => $gridColumns,
    'fontAwesome' => true,
    'stream' => false, // this will automatically save file to a folder on web server
    'deleteAfterSave' => true, // this will delete the saved web file after it is streamed to browser,
    'target' => '_blank',
    //'folder' => '@webroot/tmp', // this is default save folder on server
]) . "<hr>\n".
    'dataProvider' => $dataProvider,
    'columns' => $gridColumns,
$gridColumns = [
    ['class' => 'kartik\grid\SerialColumn'],
        'value'=>function ($model, $key, $index, $widget) { 
            return Html::a($model->author->name, '#', []);
    ['attribute'=>'buy_amount','format'=>['decimal',2], 'hAlign'=>'right', 'width'=>'110px'],
    ['attribute'=>'sell_amount','format'=>['decimal',2], 'hAlign'=>'right', 'width'=>'110px'],
    ['class' => 'kartik\grid\ActionColumn', 'urlCreator'=>function(){return '#';}]