this.proxy has no properties (Grid) (JsonStore)
Author:
wktd
01 6th, 2009 in
xn--9ou.com
edit
I'm receiving the 'this.proxy has no properties' error when i execute my grid. I can't find the error on the code:
var gridData = {
data: [{
NAME: "Someone name",
ORG: "Organization",
UPTODATE: 'true',
REGNUM: '8448579557',
BIRTH: "05/01/1976",
GENDER: "M",
}
]
}
var gridRecord = new Ext.data.Record.create([
{name: 'NAME', type: 'string'},
{name: 'ORG'},
{name: 'UPTODATE', type: 'bool'},
{name: 'REGNUM', type: 'string'},
{name: 'BIRTH', type: 'date', dateFormat: 'm/d/Y'},
{name: 'GENDER'}
]);
var store = new Ext.data.JsonStore({
data: gridData,
fields: gridRecord,
reader: new Ext.data.JsonReader({
root: 'data'
}, gridRecord),
});
store.load();
I appreciate any help!
From a quick look at the source code, you shouldn't need to call load if you've already specified the data, which is causing the error.
i removed the JsonReader, and put an ROOT propertie to JsonStore. the next code is working!
var gridData = {
data: [{
NAME: "Someone name",
ORG: "Organization",
UPTODATE: 'true',
REGNUM: '8448579557',
BIRTH: "05/01/1976",
GENDER: "M",
}
]
}
var gridRecord = new Ext.data.Record.create([
{name: 'NAME', type: 'string'},
{name: 'ORG'},
{name: 'UPTODATE', type: 'bool'},
{name: 'REGNUM', type: 'string'},
{name: 'BIRTH', type: 'date', dateFormat: 'm/d/Y'},
{name: 'GENDER'}
]);
var store = new Ext.data.JsonStore({
data: gridData,
fields: gridRecord,
root: 'data'
});
#If you have any other info about this subject , Please add it free.# |