日期:2014-05-16 浏览次数:20365 次
var ds = new Ext.data.Store({ reader:new Ext.data.JsonReader({ totalProperty:"totalProperty", root:"root", id:'id', fields:['id','userName','roleId','roleName','rName','useCompany','status','num','lastTime'] }), proxy: datas }); var gridDivId = "user_menu_"+this.pageId ; this.gridTable = new Ext.grid.GridPanel({ el: gridDivId, store:ds, cm:cm, sm:sma, stripeRows: true, //autoExpandColumn:2, viewConfig:{ forceFit:true }, //autoHeight:true, height:Main.getBodyHeight() - 10, width:Main.getBodyWidth() - 200, tbar : tbar, bbar : new Ext.PagingToolbar({ store : ds, afterPageText: '共{0}页', beforePageText: '当前页', lastText:"尾页", nextText :"下一页", prevText :"上一页", firstText :"首页", refreshText:"刷新页面", pageSize :5, displayInfo : true, displayMsg : ' {0} - {1} 条 共 {2} 条记录', emptyMsg : "暂无数据" }), title:'用户管理' }); this.gridTable.render(); ds.load({params:{start:0,limit:5}});
var store = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: "" }), reader: new Ext.data.JsonReader() }); var s = 20; var pageToolbar = new Ext.PagingToolbar({ pageSize: s, store: store, afterPageText: '/ {0}', beforePageText: '页', displayInfo: true, displayMsg: '显示 {0} - {1} / {2}', emptyMsg: '没有数据', firstText: '第一页', prevText: '前一页', nextText: '后一页', lastText: '最后一页', refreshText: '刷新', listeners: { "next": function() { } } }); // create the Grid var grid = new Ext.grid.GridPanel( { id : "grid", title : "查询结果", store : store, columns : cols, stripeRows : true, enableHdMenu: false, enableColumnMove: false, animCollapse: false, autoScroll: true, frame: true, loadMask: {msg: "检索中"},