CGridView AJAX update

Hi,

I have a CGridView with a search form at the top. The CGridView provider is built upon the criteria selected on the search form. So far so good. The problem arises when I try to do an AJAX update of the CGridView. If I delete a row of the CGridView and then issue a cgridview.update() (through AJAX), the original provider is not kept.

How can I mantain my custom provider through AJAX calls?

Thank you.

I think you might need to provide more details about your implementation…

At a guess though, I assume you have a search form which is submitted using POST to allow your CActiveDataProvider to integrate those search queries.

You should instead submit your search form using GET, which then means that the ajax update requests will use the same GET criteria for updates, and your search criteria should then be preserved after an update.

Thanks a lot for your help. I’ll try it ASAP!

Thanks a lot for your help, RedRabbit. Using GET instead of POST did the trick! :)

B)