I having trouble populating a gridx widget from a JsonRest store. See my code below... test1.json contains the same info as i have specified in the data for teststore.
When i change the grid to point at the teststore var it displays the contents correctly but when i point it at the reststore variable i get a 'No items to display' message.
Anyone know what im missing?
var restStore = new dojo.store.JsonRest({target:"http://localhost:9081/MyProj/test1.json"});
var teststore = new Store({
data: [
{id: "1", "description":"First Description"},
{id: "2", "description":"Second Description"},
{id: "3", "description":"Third Description"},
{id: "4", "description":"Fourth Description"}
]
});
grid = new Grid({
cacheClass: Cache,
store: restStore,
structure: [
{id: "description", field: 'description', width: '100%'}
]
});
grid.startup();