Howdy folks,
This ones got me stumped, hope you can help!
I have a grid view populated by a CArrayDataProvider.
The view contains a primary row, and its sub rows.
I want to display a button only one the sub rows.
The button view currently looks like this:
What I'd like to include is something along the lines of:
So basically display the button on all the rows in CGridView except the 1 row that matches the primary ID.
Is there a way to do this?
Thanks!
This ones got me stumped, hope you can help!
I have a grid view populated by a CArrayDataProvider.
The view contains a primary row, and its sub rows.
I want to display a button only one the sub rows.
The button view currently looks like this:
array( 'header' => '<span title="Actions">Actions</span>', 'class'=>'CButtonColumn', 'template'=>'{remove}', 'buttons'=>array( 'remove' => array( 'label'=>'Remove this item from this group', 'url'=>'Yii::app()->createUrl("controller/action", array("id"=>$data["id"]))', 'imageUrl'=>Yii::app()->request->baseUrl.'/images/icon/Remove.png', 'options'=>array('title'=>'Remove this item from this group'), ), ), ),
What I'd like to include is something along the lines of:
if($data['id'] == $Yii::app()->session['primaryId']) { Don't display the button }
So basically display the button on all the rows in CGridView except the 1 row that matches the primary ID.
Is there a way to do this?
Thanks!