CListView ajax update


I got a CLitView object with pagination, and need to update table data with new records and want to generate a JSON structure data from these new records and provide it to JavaScript script. The problem I got is that I can’t figure out how to pass new data to js script.

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




                                'pager' => array('header'=>'Strony ', 'nextPageLabel'=>'Następna >', 'prevPageLabel'=>'< Poprzednia', 'firstPageLabel'=>'Pierwsza', 'lastPageLabel'=>'Ostatnia'),

                                'summaryText'=>'Wyświetlono wyniki {start} - {end} spośród {count}.',


                                'afterAjaxUpdate'=>'js:function(id, data) {newUpdate(true);}',



I already found that i have to make use of variable [data] in afterAjaxUpdate function, but [data] passess all generated html content. How can I get only data that I really need?

Could anyone help?


Guys, I really need that, pleeeeeeaseee :(