Yii Framework Forum

Grid That Group Columns [Put Few Attributes In 1 Column]


(Spammail) #1

I chose Yii, because of it’s great ‘GridView’ feature.

After few days I found out that there is no option to group model attributes (put them in 1 column). This option would be very useful when you want show grid of model that has 50 attributes.

Example:

In model ‘ShopTransaction’ are attributes: …, name, surname, street, street_number, city, city_code, country, …

Normal GridView show them in 7 columns. Would be nice if I could put all of them in one column and set some separators like " " or ",\n" between attributes.

I made classes that does it ( http://www.yiiframework.com/forum/index.php/topic/52618-yii2-grid/page__view__findpost__p__255759 ), but I think it’s not nice to modify framework class (Column.php), so maybe you could add something like that in Yii2.


(Kvisweswaran) #2

With release 3.0.5 of yii2-grid, grid grouping functionalities have been added that allow to group data including master-detail nesting, adding group summaries, dynamic formatting and more. Refer group grid documentation and grid grouping demo for details.