Additional form and Cgridview

This is a simple question.

I have a page with 1 one form and an additional Cgridview with some filters.

The the filters change in the cgridview (it is NOT using ajax), the cgridiview is submitted but the external form input value are lost when the page refreshes.

Thanks for your help

When you have disabled ajax, a CGridView WILL and MUST refresh the page when a user has changed a filter or sorting order, or moved to another page.

There’s no easy work around, I guess.

Is there any reason why you have to avoid CGridView ajax?

Thanks for your reply and sorry I didn’t reply before.

I have my reasons for not using ajax. I guess I can modify my code and change it to use ajax, but I wanted to avoid that. I really thought there would be a way to save the status of the other forms in the page.

Is there a way to add input fields when the Cgridview is submitted ?

No, I don’t think there’s an easy way, as far as I understand. :(

You may want to dig deep into ‘jquery.yiigridview.js’ script to understand the working mechanism of CGridView.

I’ll take a look into that. I think it’s “interesting” that we have before & after AjaxUpdate, but not before submission callback when not in ajax mode.

Thanks again Softark.