That’s strange. Did you maybe disable AJAX updates (‘ajaxUpdate’=>false)? Actually the js settings are only set when the grid is initialized after the page has loaded. Any subsequent AJAX request should not change the stored settings for the grid.
Yes, only the grid gets replaced after an ajax call.
The settings should still be there because the page is not reloaded at all. So maybe do some more debugging with firebug. I would check what’s happening in line 33 when the page is loaded. That’s where the settings are stored:
I’ll do some more debugging Mike. The settings does not disappear, they keep the data from the first loading, all data from the grids from the first load are still there, they don’t refresh with the grids from the new page.
I had the same error, $.fn.yiiGridView.settings[‘mygrid’] was empty and raised an error.
I had a view with a form, with a cgridview (mygrid). Then I had a link that opens a Modal Dialog with an update, this form ALSO had a grid (for a diferent model). As soon as the Modal Dialog is rendered the setting attribute get unreachable.
I found the cause (for my particular case) and solved the issue:
The CGridView was loading "jquery.yiigridview.js" in the main form, and the again in the modal popup.
You have to check what JS files are you including to avoid duplicated calls. Also get sure about the JS file loaded in the main page, if the JS is not present in the main page, and you explicitly deny the JS load in the popup… you will not have the js code in nowhere.