2amigos / yii2-grid-view-library

Highly enhanced GridView widget and grid components for Yii2
https://2amigos.us
Other
57 stars 16 forks source link

Not group if count < 3 #37

Closed dasturchiuz closed 5 years ago

dasturchiuz commented 5 years ago

My problem if gouped count < 3 not gruped if count =<3 grouped how to solve this

[
                        'class' => 'dosamigos\grid\behaviors\GroupColumnsBehavior',
                        // You an use multiple columns for extra row but remember that will affect the merging
                        // as both columns must be having same values for the extra row to title the records 
                        'extraRowColumns' => ['fan_id'],
                        'extraRowValue' => function($model, $key, $index, $totals) {
                            return '<span class="label label-warning">' . $model->fanId. '</span>';
                        },
                        // you can use multiple columns here 
                        'mergeColumns' => ['fan_id','smester_id' ] 
                    ]

                ],

http://tinypic.com/r/2d1mx34/9

dasturchiuz commented 5 years ago

I am solved this problem in sort default sort set fan_id