Hello, everyone
Use widget CGridView
for the "Change" is defined property click - js function where I would like to get the values of fields in the current record.
But the $data is not available in js. Is there a chance for a given entry in JS?
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
'phone_number',
array(
'name' => 'Тип',
'value' => '$data->viewType',
),
'description',
array(
'class'=>'CButtonColumn',
'template'=> '{update} {delete}',
'buttons'=>array(
'update' => array(
'label' => 'Изменить',
'click' => 'js:function(var r = $data) {
$("#updatephone-dialog").dialog("open");
return false;
}',
),
'delete' => array(
'url'=>'Yii::app()->createUrl("secured/deletephone&id=".$data->id)',
),
),
),
)
));