Hello:-)
I’d like to render CGridView as a popup window. So i have jquery load function doing the AJAX call to controller action
where there is a renderPartial method rendering view-script with CGridView widget. The result of the script
is then returned and placed in container element calling load.
In the partial wiew-script besides CGridView widget i have some js code.
And here the problems starts.
When i call the partial by load-bounded element everything works great - CGridViev is rendered and
js script is executed. BUT when i use pagination buttons to do the ajax & render the script
CGridViev is rendered but js script isn’t executed at all. The response from each type of call
is the same. There is js code inside it but in case of pagination call js is just ignored by browser!?
Here is some code to make things clearer
in "main" view:
$('#editRowPrefixDiv').load( '$url_prefix', function( response, status, xhr ) {...}
…
in controller:
public function action...(){
...
$this->renderPartial('cennik_prefixGridSimple'...);
}
partial view-script:
$this->widget ( 'zii.widgets.grid.CGridView', array (...))
Yii::app ()->clientScript->registerScript (...)
And what’s even more odd even in a such brutal way:
<script type="text/javascript">
//<![CDATA[
alert('lopp:-)');
//]]>
</script>
$this->widget ( 'zii.widgets.grid.CGridView', array (...))
the js is always ignored using pagination
Please help me as You can…