日期:2014-05-16 浏览次数:20651 次
var grid;
var record;
var store;
Ext.onReady(function () {
//后台返回的数据格式是 {total:总页数值,rows:[{},{}]}
store = new Ext.data.JsonStore({
url: 'ExtDataModifyShipAddressList.aspx?p=' + Math.random(),
root: 'rows',
totalProperty: 'total',
fields: [
{ name: 'Id' },
{ name: 'Sid' },
{ name: 'Status' },
{ name: 'CustomerID' },
{ name: 'Description' },
{ name: 'ShipAddress' },
{ name: 'StateName' },
{ name: 'CityName' },
{ name: 'ZipCode' },
{ name: 'ContactPerson' },
{ name: 'ContactTel' },
{ name: 'ShipVia' },
{ name: 'Country' },
{ name: 'StId' },
{ name: 'Default'}],
method: 'post'
});
//加载数据
store.load({
params: {
start: 0,
limit: 20
}
});
grid = new Ext.grid.GridPanel({
frame: true,
title: 'New Customer Application List',
stripeRows: true, //斑马线
store: store,
applyTo: 'grid', //指定显示数据的div
trackMouseOver: true,
height: 550,
width: window.screen.width - 17, //屏幕分辨率的宽
loadMask: { msg: 'loading……' },
columns: [
&nbs