Hi Yii master. i have some problem about cgridview and cjuidialog.
i’ve read this post how-to-call-cjuidialog-in-cgridview to call cjuidialog from cgridview.
It’s works if i use CHtml::image(), how is about cbuttoncolumn?? “$data->NIK” don’t works…
here's cgridview:
array(
'header' => 'OPTION',
'class' => 'CButtonColumn',
'template' => '{lihat}',
'buttons'=>array(
'lihat' => array(
'label'=>'Detail', // text label of the button
'imageUrl'=>Yii::app()->baseUrl . '/images/gr-view.png', // image URL of the button. If not set or false, a text link is used
'options'=>array('style' => 'cursor: pointer;',
'onclick' => 'javascript: txt = \'$data->NIK\';
$(\'#mydialog\').text(txt);
$(\'#mydialog\').dialog(\'open\');
$(\'#mydialog\').click(function() { $(this).dialog(\'close\'); }); return false;'
),
'visible'=>'true',
),
),
can i render content of cjuidialog using renderpartial, where’s the parameter obtained from the clicked cgridview record??
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'mydialog',
// additional javascript options for the dialog plugin
'options'=>array(
'title'=>'Detail Member',
'autoOpen'=>false,
'modal'=>true,
'width'=>600,
),
));
$this->renderPartial('user_info', array('nik'=>$data->NIK));
$this->endWidget('zii.widgets.jui.CJuiDialog');
thanks for helping Yii newbie…