我用EXTjs写了一个表格面板,就是数据一直读不出来,高手帮忙看看,解决给30分,下面是代码及显示页面

Ext.onReady(function(){varcm=newExt.grid.ColumnModel([{header:"姓名",width:80,dataIndex... Ext.onReady(function(){
var cm=new Ext.grid.ColumnModel([
{header:"姓名",width:80,dataIndex:"Name"},
{header:"性别",width:40,dataIndex:"Sex"},
{header:"生日",width:150,format:"Y-m-d",dataIndex:"Birthday"},
{header:"学历",width:80,dataIndex:"Education"},
{id:"mm",header:"备注",dataIndex:"Memo"}
]);
//准备数据
var MYdata=[{
Name:"李赞红",
Sex:"女",
Birthday:Date.parseDate("1979-04-11","Y-m-d"),
Education:"本科",
Memo:"无备注"
}];

var MYproxy=new Ext.data.MemoryProxy(MYdata);

var Human=Ext.data.Record.create([
{nam:"Name",type:"string",mapping:"Name"},
{nam:"Sex",type:"string",mapping:"Sex"},
{nam:"Birthday",type:"string",mapping:"Birthday"},
{nam:"Education",type:"string",mapping:"Education"},
{nam:"Memo",type:"string",mapping:"Memo"}
]);

var MYreader=new Ext.data.JsonReader({},Human);

var store=new Ext.data.Store({
proxy:MYproxy,
reader:MYreader,
autoLoad:true
});
var grid=new Ext.grid.GridPanel({
title:"中国公民",
width:600,
autoHeight:true,
cm:cm,
store:store,
autoExtpandColumn:"mm",
renderTo:Ext.getBody()
});
});
展开
 我来答
zhaoapk
2013-12-04
知道答主
回答量:0
采纳率:0%
帮助的人:0
展开全部
var Human=Ext.data.Record.create([
// 这里name写成nam了
{nam:"Name",type:"string",mapping:"Name"},
{nam:"Sex",type:"string",mapping:"Sex"},
{nam:"Birthday",type:"string",mapping:"Birthday"},
{nam:"Education",type:"string",mapping:"Education"},
{nam:"Memo",type:"string",mapping:"Memo"}
]);
追问
谢了,确实是,找半天。愣是没发现,分给你
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
?>

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式