I have a CListView on a page and every time i navigate to page 2 or any other page I want to call a method that formats the view. But it do not seem to work every time I navigate to another page.
The Javascript method I want to call is called updateDivs()
Here is my list view widget
$this->widget('zii.widgets.CListView', array(
'dataProvider' => $dataProvider,
'itemView' => '_customview',
'id' => 'bannerslist',
'ajaxUpdate' => true,
'afterAjaxUpdate' => ' updateDivs()',
'enablePagination' => true,
'itemsCssClass' => 'row banners-list',
'summaryText' => 'Total ' . $pages->itemCount . ' Results Found',
'pager' => array(
'header' => '',
'prevPageLabel' => '<',
'nextPageLabel' => '>',
),
));
Please try this to test, it should works well.
'afterAjaxUpdate' => 'js:function(id,data){alert("test");}'So if this code will works perfect then you should search problem in your
updateDivs()function