CArrayDataProvider and CListView

I am using the Cdataarrayprovider in the CListView. I am getting the data perfectly.

But my problem is , I am displaying the data in the popup and in the popup I have paginations also.

When I click on the pagination part of the popup, suppose say page "3", the page gets refreshed and the fater refresh page is going back to the base url from which I am bringing the popup.

Can I make the pagination work without page refresh?

Maybe this is your problem:

If you render into a popup (I don’t which popup you mean) you normally should use renderPartial in your controller.

The pagination sends an ajax-request with the page as GET-param, but by default the gii-code renders the full page if it’s a (ajax) call from the pagination or not. So you have to check:

	public function actionIndex()



                $dataProvider=new YourArrayDataProvider(...);

                if (Yii::app()->request->isAjaxRequest)  




                        //false, true  <- maybe you have to set outputProcessing = true to render additional scripts too   









If we follow the tutorial as in the link :

and if we try the same in our localcopy, if we goto the url "test/index.php?r=user/index" , we see the pagination implemented. In the pagination, the pages 1,2,3: if we see the console on clicking them , they carry a parameter "&ajax=…" this parameter itself is not there in my pagination link.

I am using CListView with CArrayDataProvider. From the tutorial demo, I get the pagination link as below

" <li class="page selected"><a href="/yii/test/index.php?r=user/index&amp;ajax=yw0">1</a></li> "

But in my implmentation I have it like this : "<li class="page"><a href="/baseUrl/index.php?r=site/TestPage&amp;page=4">4</a></li>

You should have a js added at the bottom of the HTML output similar to: