More info row on cgridview

I found a topic http://www.yiiframework.com/forum/index.php/topic/29387-2-rows-per-item-in-cgridview/page__p__141496__hl__add+new+row+cgridview#entry141496 but i didnt make it work. I dont know how can i add id on rows as data’s id. etc…

I want to add an extra row above every data row as hidden and a data will be written on it with same model.

| name | status

john 1 view details

adres:xxx yyy zzz (hidden row)

And place a detail button in cbuttoncolumn. when click on it, will show hidden row. Need your help, thanks…

Here is my gridview




this->widget('ext.bootstrap.widgets.BootGridView',array(

	'id'=>'drug-grid',

	'dataProvider'=>$model->search(),

	'filter'=>$model,

	'columns'=>array(

		'drug_id',

		'date_changed',

		'name',

		'company_data.name',

		'drug_type_data.name' ,

		array(

                'name'=>'status',

                'type'=>'raw',

                'value'=>'$data->getStatusText()',

        ),

				array(

			'class'=>'CButtonColumn',

			'template'=>'{detail}',

			'buttons'=>array (

						'detail'=> array(

                        'label'=>'Show Details', 

                        'url'  =>'Yii::app()->createUrl("drugupdate/view", array("id"=>$data->id))',

                        'options'=>array('title'=>'Show details','class'=>'detailsLink'),

                    ),


		   	)

		),

	),

));



any help would be nice… :)

I really don’t know if the widget supports something like what you want.

But a solution would be to give some column a specific value, where you’d include a hidden div or span with some class, which you’d show by jQuery when the user clicks the button.

The downside is that it’s not really a separate row (as I get it you want), but limited to one column of your choice.

And maybe you could see if this GroupGridview extension can help (I guess it could).

I think i can hide a div on an existing row and i can show it with jQuery… But it’s better to add an extra row :) Thank you