Expandable detail row in yii2-grid

I am almost finished with another major enhancement to the yii2-grid extension and created a new grid column ExpandRowColumn. I would like to have feedback and here are the features available with this enhancement:


[*]Offers a separate column to slide up and down detail rows that can be used to show detail data for each row by config.

[*]Use cases can be - Against each row you can dynamically show a DetailView, Detail Form, OR summary columns by controlling the markup as needed.

[*]Works seamlessly with PJAX enabled grid by default

[*]Can show specific rows expanded or collapsed by default.

[*]Configure only specific rows for expanding or collapsing and hide indicators where not needed

[*]Configure ability to disable expand/collapse indicators.

[*]Use Closure callbacks for configuring advanced scenarios


Here is a sneak peek/screenshot. Share feedback if any.



Wow, it look great, I was just looking sometinhg like this for a master /detail view.

 You're doing a great job.

Thank you, it will be very useful.

Thanks for the feedback.

This is now completed (check ExpandRowColumn docs) and is ready for use (check the demo).

Thank you for this enhancement.

I posted this a few days ago, and found this.

I will give a try to your ExpendRowColumn, and see if it can help, like building a view with the summaries (group by’s) and show subgridview in detail view for each line of the summary.

What do you think about including this into your gridview, with partial summaries?

(It was based on this one.)

Anyway, thank you for your outstanding contribution to yii.

Yii long and prosper.


can i using multiple expand row in my gridview? like


            'class' => 'kartik\grid\ExpandRowColumn',

            'expandAllTitle' => 'Expand all',

            'collapseTitle' => 'Collapse all',

            'expandIcon'=>'<span class="glyphicon glyphicon-expand"></span>',

            'value' => function ($model, $key, $index, $column) {

                return GridView::ROW_COLLAPSED;


            'detailUrl' => Url::to(['experience/detailrel']),

            'detailRowCssClass' => GridView::TYPE_DEFAULT,

            'pageSummary' => false,



            'class' => 'kartik\grid\ExpandRowColumn',

            'expandAllTitle' => 'Expand Delivery all',

            'collapseTitle' => 'Collapse Delivery all',

            'expandIcon'=>'<span class="glyphicon glyphicon-expand"></span>',

            'value' => function ($model, $key, $index, $column) {

                return GridView::ROW_EXPANDED;


            'detailUrl' => Url::to(['experience/detaildel']),

            'detailRowCssClass' => GridView::TYPE_DEFAULT,

            'pageSummary' => false,


Hi Kartik,

i use expand in gridview it’s working good but in pagination not working expand…i think pjax not working

hi, Kartik

Thanks for this fantastic extension. it works fine for me excepte two attributes are not working:

‘expandOneOnly’ => false,

There is no error, but not working as well, I still can expandmore than one row.

I double checked my settings are exactly same as your demo, just not working for me.

I am using composer installed the extension .

please advise, thanks

Hi Kartik,

how would it be possible to update expanded row fields values and save them to db?

Thank you


this is super old…he has this in a widget and also a lot of other ones

Krajee / Kartik Yii2 Widgets