Answer the question
In order to leave comments, you need to log in
Why doesn't kartik GridView group data?
I have a table with recursive data like
id
name
some_data
parent_id
parent_id refers to the id of the same table. [
'attribute' => 'ParentID',
'group' => true,
'groupedRow' => true,
'value' => function ($model) {
return $model->parent->Description . ' (' . $model->ParentID . ')';
},
'groupOddCssClass' => 'kv-grouped-row',
'groupEvenCssClass' => 'kv-grouped-row',
],
However, the data is not grouped, the same header is shown several times... I put the id in the header, they are the same. 'attribute' => 'parent.Code',
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question