rendering gridview columns?

Hi,

is there somwhere an example on how to specify an extra column with CGridView and where te value is set with a renderPartial method?

Show us your view code where you render the widget and describe what this extra column is.

I hoped I could do something like this:

$this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=>'user-grid',


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


'columns'=>array(


	array('type'=>'html', 'value'=>$this->renderPartial('_viewcol',array('data'=>$data))),


	array(


		'class'=>'CButtonColumn',


	),


),

));

and in the view:

<div class="view">

&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('id')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;id); ?&gt;&lt;br/&gt;


&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('name')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;name); ?&gt;

</div>

My idea is to get the grid rows horizontal instead of vertical orientated.

better late then never and maybe some other will find this posting.

this is what you where looking for:

‘value’=>’$this->grid->getOwner()->renderPartial(\’_viewcol\’, array(\‘data\’=>$data),true);’,