Question

I'm using CArrayDataProvider (which is basically a customized query i've created) that returns all the results (over 1000) from the database.

I'm using the results in the view but when i'm using the pagination it's going back to the controller for another query.

my question is: is there any way to move on the the next set of results (already part of the result array) without going to the controller and model again.

*My controller has a fairly advanced function which requires variables and parameters which i dont have in the view when trying to use standard AJAX request for the next page.

thanks, Danny

Was it helpful?

Solution

my question is: is there any way to move on the the next set of results (already part of the result array) without going to the controller and model again

Then my answer would be NO if you was using CGridview's pagination. In your situation, you have to make the pagination by yourself instead. You have already selected all of records, and would like to manipulate them on your client side, you really don't need the pagination of CGridview at all.

Pushing all of records into a page on first load is not good idea, but maybe your requirement has asked, I just say that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top