0
In place of {{ VALOR DO ID }}
I’d like to put the ID
of the respective user. Seeing that this is a Row
of a Grid
.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'usuario-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'idUsuario',
'nome',
'email',
array(
'class'=>'CButtonColumn',
'template'=>'{view}{update}{delete}',
'buttons'=>array (
'view' => array (
'options'=> array (
'data-url' => Yii::app()->controller->createUrl("view", array("id" => {{ VALOR DO ID }} )),
),
'click'=>'function(){
$(".content").load($(this).data("url"));
}',
'url'=>'"#"',
),
),
),
),
)); ?>
If you have PHP 5.3, you can use a function as follows: 'url' => Function($data) { Return ...; }
– Anderson Danilo