// grid with telephone list
$this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'sg-telefon-grid',
'dataProvider'=> $model->searchspec(),
'ajaxUpdate'=>true,
'filterPosition'=>'none',
'template'=>'{items}{summary}',
'pager'=>array('header'=>''),
'enableSorting' => false,
'enablePagination'=>false,
'summaryText' => '{count} záznamů nalezeno',
// 'filter'=>$model,
'columns'=>array(
'idtel',
array(
'name'=>'firma',
'type'=>'raw',
'value'=>'$data->firmaname->firma',
),
'idosoby',
'telefon',
'robinson',
'zdroj',
array(
'name'=>'Flag',
'type'=>'raw',
'value'=>'$data->robinson',
),
array(
'name'=>'Osoba',
'type'=>'raw',
// works but not like ajax
//'value'=>'CHtml::link($data->idosoby,array("sgOsoby/view","id"=>$data->idosoby))'
// dont work
'value'=>'CHtml::ajaxLink($data->idosoby,
array("sgOsoby/view",
"id"=>$data->idosoby,
"update"=>"viewdiv" )
)'
),
// other way - but syntax error
array(
'name'=>'Osoba',
'type'=>'raw',
'value'=>'CHtml::link(
"wtf",
"",
array(
"onClick"=>CHtml::ajax(array
(
"url"=>array("sgOsoby/view"),
"update"=>"viewdiv",
),
"style"=>"cursor:pointer"
)
)
)',
),
array(
'class'=>'CButtonColumn',
),
),
));
<div id="viewdiv" >
detail view
</div
Osoba, osoby etc = Person
i would like to display detail view of person from grid with telephone list
but in div viewdiv not in all window
Parse error: syntax error, unexpected ‘=>’ (T_DOUBLE_ARROW) in C:\xampp\htdocs\yii\framework\base\CComponent.php(606) : eval()'d code on line 10
Thanks for any advice or demo example