How can i get $data->user->name to be label name of button.
'label' => $data->user->name
in :
array(
'class'=>'CButtonColumn',
'template'=>'{Preview}',
'buttons'=>array(
'Preview'=>array(
'label'=>'Details',
'url'=>'Yii::app()->createUrl("/administration/order/getBillingInfo", array("id"=>$data->id))',
'click'=>'window.billingInfo',
),
),
'htmlOptions'=>array('style'=>'text-align:center;', 'class'=>'gButtons'),
),
This is my Widget:
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'orders-grid',
'ajaxUpdate'=>false,
'dataProvider'=>$model->search(),
'htmlOptions'=>array('class'=>'grid'),
'pager'=>array(
'maxButtonCount'=>Yii::app()->params['maxButtonCount'],
),
How can i get $data->user->name to be label name of button.
$data does not exist in that context
Try: