Hi,
I have a similar problem but not the same. I’m using the gridview widget, and i’d like to use render partial (like render the update form on the same page filled with the proper data), if i could have the id from that point it wont be a problem at all i guess =)
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'projecten-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'userid',
'project_code',
'name',
'description',
'visible',
array(
'class'=>'CButtonColumn',
'updateButtonOptions'=>array('title'=>'',
'ajax'=>array(
'update'=>'dataform',
'url'=>Yii::app()->createUrl("update",array("id"=>$data->id)),
'dataType'=>'html',
'type'=>'POST',
),
),
),
),
)); ?>
but i can not get there the id. if im seeing the source, i got this:
jQuery('#yt1').click(function(){jQuery.ajax({'url':'/index.php?r=update&id=projecten','dataType':'html','type':'POST','cache':false,'data':jQuery(this).parents("form").serialize(),'success':function(html){jQuery("dataform").html(html)}});return false;});
somebody has an idea whats happening with the $data variable, why cant i retrieve the information from it?
thx