There is a lot of people pushing this out, let’s we share them our points
this is the similiar case what you want to:
How to add ajaxButton in the CGridView
How to call cjuidialog in cgridview?
for now i am using div popup and embeded it in value attribut of cgridview.
beware of other feature such a sorting, ajax search or paging when you embed some new js/ajax in cgridview since there is a lots of feature already embeded in it and mixed them all…
Thanks, I read these topic. I want ‘How to call cjuidialog in cgridview’ later, now my task to create cjuidialog near cgridview, and update grid after commit ajax form in dialog. I’ve got to update grid view after submit ajaxbutton next way: in createDialog i put tag <head> <body>
Calling the CJuiDialog from an ajaxlink (in cgridview) has worked. However, when the dialog contains a form and the data is updated, I would like to refresh, repaint, update the gridview.
So far, it hasn’t worked, because there’s a javascript error “yiiGridView is undefined”.
How do you "define" yiiGridView in the CJuiDialog?
apparently this is a well known problem, you can read what the boss says about:
Look at the html code of your ajax response. The problem is that jquery (or maybe another core script that you already have in the page) is loaded again
You can solve including this holy snippet in the partial view:
Yii::app()->clientScript->scriptMap=array(
//scripts that you don't need inside this view
'jquery.js'=>false,
);
Make sure that jQuery Javascript file is referenced/loaded before your <title> tag in the <head> section.
Yii used to put js scripts just before <title> so if you have this tag at the beginning of the <head> section, likely will be trying to load yii stuff before jquery.