how get next page in ClistView with ajax when scrolling down page

Hi any one . I want to load next page in clistView with ajax just when i scroll down the page like when you click on page numbers in pager. How I can do it ??

Should I use $.fn.yiilistView.update() ?? (how is it work ??)


if you need auto load infinite scroll use the following extension.

first one I implemneted it, very easy and usefull

thanks Jawwad … i attempted to use first one because i have yii 1.1 but when i put the example code in my view no thing happened . clistView is loading but just viewing first page and when i scroll down the page nothing happen !! although the ext is working and js,css file are loaded but nothing happen when i scroll down page !

(jquery.ias.js,jquery.ias.css files are loaded)

i think run method doesn’t work because no thing echo although the buttons should echo from that(run method).

do you know where is the problem ??

example code in ext page :

$this->widget('zii.widgets.CListView', array(

        'id' => 'VideoList',

        'dataProvider' => $dataProvider,

        'itemView' => '_view',

        'template' => '{items} {pager}',

        'pager' => array(

            'class' => 'ext.infiniteScroll.IasPager',


            'listViewId' => 'VideoList',

            'header' => '',


            'options' => array('history' => false, 'triggerPageTreshold' => 2, 'trigger'=>'Load more'),




Interested that my solution connived you to do a try, check the working example may have worth for you

Had you checked the js console ?? is there any error you can see??

the rowselector is correct?? I assume it is correct.

from the post the code you posted looks okh to me check that your ajax request get the response or may have some problem with that. I suggest to try the extension with a simple view and controller outside the project and once it working you will easily implement it back to your page.