监听onbeforeload事件
function onBeforeLoad(e){
var grid=e.sender;
var url=...........................
grid.setUrl(url)
}
这样试试作者: nnin41572382 时间: 2014-5-23 16:59:55
felt 发表于 2014-5-23 16:07
监听onbeforeload事件
function onBeforeLoad(e){
var grid=e.sender;
// 设置传参
var prid = window.Owner.prid;
var id = window.Owner.id;
var flag = window.Owner.flag;
var currentProjectId = window.Owner.getcCurrentProjectId();
// 获取分页数据
// 页码
var pageIndex = grid.getPageIndex();
// 每页多少条
var pageSize = grid.getPageSize();
// 设置起始分页
var start = pageIndex * pageSize;
var limit = pageSize;
// grid控件数据url
var url = '/Domain/DynamicGridAjax.do?serviceUrl=ModelVersion/getFeaVersionList/'
+ prid
+ '/'
+ id
+ '/'
+ flag
+ '/'
+ currentProjectId
+ '/'
+ start + '/' + limit;
grid.setUrl(url);
});
// 提交和发布页面的初始化
function getData() {
var grid = mini.get("grid");
// 设置传参
var prid = window.Owner.prid;
var id = window.Owner.id;
var flag = window.Owner.flag;
var currentProjectId = window.Owner.getcCurrentProjectId();
// 获取分页数据
// 页码
var pageIndex = grid.getPageIndex();
// 每页多少条
var pageSize = grid.getPageSize();
// 设置起始分页
var start = pageIndex * pageSize;
var limit = pageSize;
// grid控件数据url
grid.url = '/Domain/DynamicGridAjax.do?serviceUrl=ModelVersion/getFeaVersionList/'
+ prid
+ '/'
+ id
+ '/'
+ flag
+ '/'
+ currentProjectId
+ '/'
+ start
+ '/' + limit;
// 重新加载grid
grid.load();
}