Client-Side Sorting & Pagination With Cgridview And Carraydataprovider

I am fetching all of the data for the array in one request(web service), and I’d like to do the pagination purely on the client side (with javascript). IE: My if my array has 300 items, I want to display 20 at a time with pagination / sorting - without having to make any additional server requests for the pagination / sorting functions.

It is possible?

Yes possible. you have to use some jQuery plugins like jQuery grid to do this work.

thx for replay, yes its possible, now i used datatable, but i wanna use cgridview

CGridview doesn’t support clientside pagination, it always does an ajax request to your controller.

All you can do is to cache the data from the remote webservice at your server so that not always the webservice will be called on different pages.

See DataCache