-
23 Dec 2008 12:59 AM #1
How to load grid store json from file in Application Storage Directory
How to load grid store json from file in Application Storage Directory
Hello,
is it possible to load an text file including a JSON string from the application storage directory from my air application to the grid data store?
Thanks,
Stephan
-
24 Dec 2008 9:54 AM #2
it should work. The JsonStore & GridPanel definition whould look something like this (referencing the file in the app-storage directory using the app-storage:/ shortcut) :
Code:var someJsonstore = new Ext.data.JsonStore({ url: 'app-storage:/some/text/file.js', root: 'rows', fields:[ {name: 'field1'}, {name: 'field2'}, {name: 'field3'} ] }); var panel = new Ext.grid.GridPanel({ id: 'someId', store: someJsonStore, columns: [ {...} ] });


Reply With Quote