How To Create Gridview Expand/collapse

I am new in Yii framework, so i want create a gridview row expands. i have two tables with me - basically gridview shows the first table (which have basic data) after click in table row then it will expands and show the detailed table below. What code i want place in controller and in view…?

The best suggestion is, you need to use yii bootstrap extension, so you can show your details data on model (through ajax request) and also its will save the space and increase the loading speed :)

see demo -

download full code here -