Ajax pagination in ListView

Hi, explain please, how enable ajax pagination in widget ListView. I have tried to do so:

use yii\widgets\ListView;

use yii\widgets\Pjax;

Pjax::begin(); //['timeout'=>700] ['enablePushState'=>false] 

echo ListView::widget([ 

        'id' => 'sdfsd',

        'dataProvider' => $dataProvider,

        'itemView' => '_news',

        'layout' => '

            <div class="cat_title_block">News{pager}</div>



                <div class="clr"></div>



        'pager' => [

            'maxButtonCount' => 5,

            'prevPageLabel' => '<',

            'nextPageLabel' => '>',

            'firstPageLabel' => '<<',

            'lastPageLabel' => '>>',




but it’s not work.

The following link will definitely help you:


$maxButtonCount: Maximum number of page buttons that can be displayed. Defaults to 10.

It is not for no. of records to be displayed.

You need to set $pagination.