Hello,
Can anyone help me if there is a way to make all of the cgridviews in my application to use the function before and after ajax update? Thank you.
[indent][indent]<?php
$jsFunction = 'function(){
//some js function code
}';
/**
- Grid view of links and form to create new link
*/
$this->widget(‘zii.widgets.grid.CGridView’, array(
‘id’ => ‘linkGrid’,
‘dataProvider’ => $model->search(),
‘ajaxUpdate’ => true, //‘ajaxVar’ => ajax by default
‘afterAjaxUpdate’ => $jsFunction,
‘beforeAjaxUpdate’ => $jsFunction,
‘filter’ => $model,
‘htmlOptions’ => array(‘class’ => ‘grid-view span-24’),
‘columns’ => array(
'static_link_url',
'static_link_title',
…
?>[/indent][/indent]