extjs中JsonStore数据获取 20
2011-07-16
展开全部
extjs中JsonStore数据获取
定义类型,注意和你json返回的记录格式要一致
var MyRecordType = Ext.data.Record.create
([
{name: "id", type: "int"},
{name: "name", type: "string"}
]);
//要添加的记录
var oneRecord = new RecordType
({
id: 0,
name: "张三"
});
//Store
var userStore = new Ext.data.Store({
//此处省略
})
userStore.load();
userStore.add(oneRecord);
啍曳勾抒崯敿族澪匁摢满棡晀嗗囮
定义类型,注意和你json返回的记录格式要一致
var MyRecordType = Ext.data.Record.create
([
{name: "id", type: "int"},
{name: "name", type: "string"}
]);
//要添加的记录
var oneRecord = new RecordType
({
id: 0,
name: "张三"
});
//Store
var userStore = new Ext.data.Store({
//此处省略
})
userStore.load();
userStore.add(oneRecord);
啍曳勾抒崯敿族澪匁摢满棡晀嗗囮
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询