您的位置:首页 > Web前端 > JavaScript

Extjs4.2 grid Store 删除问题

2014-03-29 20:18 204 查看
解决grid该页删除后向前跳页的问题
if((Ext.getCmp("nutchConfigurationGrid").getStore().totalCount-1)%Ext.getCmp('nutchConfigurationGrid').getStore().pageSize==0){
var pageIndex = (Ext.getCmp("nutchConfigurationGrid").getStore().totalCount-idArray.length)/Ext.getCmp('nutchConfigurationGrid').getStore().pageSize;

if(pageIndex != 0){ //indicate that there has data after delete
Ext.getCmp('nutchConfigurationGrid').getStore().currentPage = 1;
}else{
Ext.getCmp('nutchConfigurationGrid').getStore().currentPage = pageIndex;
}
}
Ext.getCmp("nutchConfigurationGrid").getStore().load();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: