我想在kartik gridView中显示页面摘要。我的代码如下:
$columns = [
['class'=>'kartik\grid\SerialColumn', 'width'=>'50px'],
[
'class'=>'kartik\grid\ExpandRowColumn',
'width'=>'50px',
'value'=>function ($model, $key, $index, $column) {
return GridView::ROW_COLLAPSED;
},
'detail'=>function ($model, $key, $index, $column) {
return Yii::$app->runAction('invoice/detaildebtors', ['model' => $model['branch_id']]);
},
'headerOptions'=>['class'=>'kartik-sheet-style'],
'expandOneOnly'=>true
],
[
'attribute'=>'branch_name',
'vAlign'=>'middle',
'hAlign'=>'left',
],
[
'attribute'=>'0-60 days',
'label' => "0-60 days",
'vAlign'=>'middle',
'hAlign'=>'right',
'format'=>['decimal', 0],
'pageSummary'=>true,
],
];
echo GridView::widget([
'columns'=>$columns,
'dataProvider'=>$dataProvider,
'floatHeader'=>true,
'floatHeaderOptions'=>['top'=>'50'],
'floatOverflowContainer' => true,
'responsiveWrap'=>false,
'panel' => [
'type'=>GridView::TYPE_PRIMARY,
'heading'=>'<h3 class="panel-title"><i class="glyphicon glyphicon-globe"></i> Debtors\' Report</h3>',
'footer'=>false,
],
'toolbar' => [],
]);
我想要页面摘要。我怎么才能得到它。 该网格中还有一个嵌套网格。
此外,我想提供列宽并允许在该列中进行文本换行。 我怎么能这样做?