Hi,
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(
'dataProvider'=>$data,
'itemView'=>'_item',
'itemsTagName'=>'table',
'pager' => array('header'=>'Strony ', 'nextPageLabel'=>'Następna >', 'prevPageLabel'=>'< Poprzednia', 'firstPageLabel'=>'Pierwsza', 'lastPageLabel'=>'Ostatnia'),
'summaryText'=>'Wyświetlono wyniki {start} - {end} spośród {count}.',
'template'=>'{items}{summary}{pager}',
'afterAjaxUpdate'=>'js:function(id, data) {newUpdate(true);}',
'viewData'=>array('columns'=>$columns),
));
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?
BarBQ