Closed AlexNiko01 closed 5 years ago
It works without groupFooter as well. Hope you have ruled out browser cache and stale asset issue. Cross check and if issue persists share the yii2-grid grid-group.js version you see on your your browser view source code and also the configuration of your GridView widget.
Currently closing this as cannot reproduce your use case. If you have a method to reproduce this - please share an example - and can reopen this issue.
Hi, i can confirm it really works only with groupfooter attribute. It definitively used to work :)
kv-grid-group.js @version 3.2.7
using your example from: https://demos.krajee.com/group-grid-demo/7 :
echo GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => null,
'showPageSummary' => true,
'pjax' => true,
'hover' => true,
'panel' => ['type' => 'primary', 'heading' => 'Grid Grouping Example'],
'toggleDataContainer' => ['class' => 'btn-group mr-2'],
'columns' => [
// note that you MUST NOT have the first column as a grid group
// to achieve that add a dummy hidden column like shown below
['class' => 'kartik\grid\SerialColumn', 'hidden' => true],
['attribute' => 'year', 'group' => true, 'groupFooter' => $gfYear, 'pageSummary' => 'Page Summary'],
['attribute' => 'month', 'group' => true, 'subGroupOf' => 1, 'groupFooter' => $gfMonth],
['attribute' => 'cat', 'group' => true, 'subGroupOf' => 2, 'groupFooter' => $gfCategory],
['attribute' => 'region', 'group' => true, 'subGroupOf' => 3, /*'groupFooter' => $gfRegion*/],
['attribute' => 'id', 'label' => 'ID', 'hAlign' => 'center', 'width' => '150px'],
['attribute' => 'amount', 'label' => 'Amount ($)', 'format' => ['decimal', 2], 'hAlign' => 'right', 'width' => '150px', 'pageSummary' => true],
],
]);
it looks like this:
Hello. After update to 3.2.8 version I have problems with subGroupOf 2nd 3rd lvl. Works only with 1 subGroupOf in table. The example you show as solution ( http://demos.krajee.com/group-grid-demo/7 ) is works only with 'groupFooter' attribute, that I doesnt need in my table. Thanks.