var record =new Ext.data.Record.create (
[
{ name: 'Functionid', type: 'int' },
{ name: 'Functionname', type: 'string'},
{ name: 'Functioncode', type: 'string' },
{ name: 'Functionurl', type: 'string' }
]
); var reader = new Ext.data.JsonReader({
id: 'Functionid',
root: 'newsList',
totalProperty: 'totalProperty',
fields: [{
name: 'Functionid',
type: 'int'
}, {
name: 'Functionname',
type: 'string'
}, {
name: 'Functioncode',
type: 'string'
}, {
name: 'Functionurl',
type: 'string'
}]
}) store = new Ext.data.Store({
remoteSort: false,
url: '/SystemBaseInfo/GetFunctionAll',
method: 'POST',
reader: reader
}); store.setDefaultSort('Functionid', 'ASC');
var request = {
start: 0,
limit: 25
}; store.load({
params: request
});
//store.each(function(record) {
// alert("111");
// alert(record.get('Functionname'));
//});
Ext.MessageBox.alert(store.getById(1003).get('Functionname'));
其中报getbyid()未定义
[
{ name: 'Functionid', type: 'int' },
{ name: 'Functionname', type: 'string'},
{ name: 'Functioncode', type: 'string' },
{ name: 'Functionurl', type: 'string' }
]
); var reader = new Ext.data.JsonReader({
id: 'Functionid',
root: 'newsList',
totalProperty: 'totalProperty',
fields: [{
name: 'Functionid',
type: 'int'
}, {
name: 'Functionname',
type: 'string'
}, {
name: 'Functioncode',
type: 'string'
}, {
name: 'Functionurl',
type: 'string'
}]
}) store = new Ext.data.Store({
remoteSort: false,
url: '/SystemBaseInfo/GetFunctionAll',
method: 'POST',
reader: reader
}); store.setDefaultSort('Functionid', 'ASC');
var request = {
start: 0,
limit: 25
}; store.load({
params: request
});
//store.each(function(record) {
// alert("111");
// alert(record.get('Functionname'));
//});
Ext.MessageBox.alert(store.getById(1003).get('Functionname'));
其中报getbyid()未定义
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货