日期:2014-05-16 浏览次数:20348 次
<html>
<head>
<link rel="stylesheet" type="text/css" href="./ExtJS4/resources/css/ext-all.css" />
<script type="text/javascript" src="./ExtJS4/ext-all.js"></script>
<script type='text/javascript'>
Ext.onReady(function(){
var proxy = new Ext.data.ScriptTagProxy({url:'http://127.0.0.1:9000/Test/GetInfo'});
var reader = new Ext.data.JsonReader(
{root:'Data',totalProperty :'TotolRecord'},
[
{name: 'id'},
{name: 'name'},
{name: 'descn'}
]
);
var store = new Ext.data.Store(
{
proxy:proxy,
reader:reader
}
);
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{header:"id",dataIndex: 'id'},
{header:"name",dataIndex: 'name'},
{header:"descn", dataIndex: 'descn'}
],
height:400,
width:600,
title:'产品信息',
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: '总记录数 {0} - {1} of {2}',
emptyMsg: "没有记录"
})
});
grid.render('grid');
store.load({params:{start:0,limit:25}});
});
</script>
</head>
<body>
<div id="grid" style="height:265px;"></div>
</body>
</html>
Uncaught TypeError: Cannot read property 'prototype' of undefined ext-all.js:21
var reader = new Ext.data.JsonReader(
{ root: 'Data', totalProperty:&