不显示数据(后台已接受请求,并且回发数据),不提示任何错误
确定数据格式以及路径正确
JS如下
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: [
new Ext.grid.RowNumberer(), //行号
{header: '<font size=2>Id</font>', dataIndex: 'Id', sortable: true },