how to show a gridview like the grid in GRIDVIEW WITH ROW EXPAND AND COLLAPSEthe grid should show normal datas in view when clicking the row that should show the details of a thecorresponding row ..please help inthis…
my output should be like

AND when i click the row it should expand and give details(the image will show table but thats need not i need to render the detail view in that.

EDITED i forgot to add onething the grid will load from one model and row details will load from another model.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'books-grid',
'dataProvider'=>$model->Projectwisereport(),
//'filter'=>$model,
'columns'=>array(
array(
'name' => 'Project',
'value' => 'Project::model()->findByPk($data->Project)->proj_name',
'filter'=>CHtml::listData(Project::model()->findall(),'proj_id','proj_name'),
),
'isbn_no',
'source_type',
array(
'name' => 'complexity',
'value' => 'Complexity::model()->findByPk($data->complexity)->Complexity_Name',
'filter'=>CHtml::listData(Complexity::model()->findall(),'id','Complexity_Name'),
'footer'=>'Total Page',
),
array('class'=>'CButtonColumn',
'template'=>'{detail}',
'buttons'=>array(
'detail'=>array(
'label'=>'Show Details',
'url' =>'Yii::app()->createUrl("Process/View", array("id"=>$data->book_id))',
'options'=>array('title'=>'Show details','class'=>'detailsLink'),
'click'=>"$('#your-grid-book_id').on('click','.detailsLink',function(){
var row=$(this).closest('tr');
var url=$(this).attr('href');
$.get(url,{},function(data){
row.after(data.row);
},'json');
})",
)
)
)
),
)); ?>
i trided this but no use grid is from books model and link to process model in the CButton column
Try this:
In GridView:
js code:
From your controller ajax action send data in trs(table rows)..I hope the code is self explainatory..