//准备数据
var data = [
{
name: "李赞红",
sex: "男",
birthday: Date.parseDate("1979-04-11", "Y-m-d"),
edu: "本科",
memo: "无备注"
},
{
name: "陈南",
sex: "男",
birthday: Date.parseDate("1987-08-06", "Y-m-d"),
edu: "本科",
memo: "一个小帅哥哈"
},
{
name: "易珊静",
sex: "女",
birthday: Date.parseDate("1980-05-12", "Y-m-d"),
edu: "本科",
memo: "无备注"
},
{
name: "张海军",
sex: "男",
birthday: Date.parseDate("1980-12-11", "Y-m-d"),
edu: "本科",
memo: "无备注"
},
];
//Proxy
var proxy = new Ext.data.MemoryProxy(data);
//Record 定义记录结果
var Human = Ext.data.Record.create([
{name: "Name", type: "string", mapping: "name"},
{name: "Sex", type: "string", mapping: "sex"},
{name: "Birthday", type: "string", mapping: "birthday"},
{name: "Education", type: "string", mapping: "edu"},
{name: "Memo", type: "string", mapping: "memo"}
]);
//Reader
var reader = new Ext.data.JsonReader({}, Human);
//store
var store = new Ext.data.Store({
proxy: proxy,
reader: reader
});
store.load();
?
详细解决方案
ext_GridPanel2_五
热度:248 发布时间:2013-11-22 23:06:19.0
相关解决方案