我需要在更新 yiigridview ($.fn.yiiGridView.update()) 后坚持当前页面,所以我的问题是如何在 js 中获取当前页面:
$this->widget('bootstrap.widgets.TbExtendedGridView', array(
'id' => 'stocktake-details-grid',
'dataProvider' => $dataProvider,
'columns'=>array(
array(
'class' => 'editable.EditableColumn',
'name' => 'physical_qoh',
'editable' => array(
'url' => array('StocktakeDetails/update'),
'placement' => 'top',
'onSave' => 'js: function(e, params) {
$.fn.yiiGridView.update("stocktake-details-grid", {
data: {StocktakeDetails_page: currentpage}
});
}',
),
),
)