PDA

View Full Version : Can't attach json store to grid panel



Radius-Service
10 Aug 2010, 2:57 AM
Hello, I design application on PHP, and for designing user interface I use ext desingner. I should design a many tables, but I have a problem. When I create grid panel and JsonDataStore, add comunications between table columns and data store and next...result is not deduced in the tables. For JsonDataStore source I use file:
cars.json

({"total":"4","results":[{"0":"Porche","manufacturer":"Porche","1":"911","model":"911","2":"13500000","price":"13500000","3":"NULL","wiki":"NULL","4":"NULL","img":"NULL"},{"0":"Nissan","manufacturer":"Nissan","1":"GTR","model":"GTR","2":"1300000","price":"1300000","3":"NULL","wiki":"NULL","4":"NULL","img":"NULL"},{"0":"BMW","manufacturer":"BMW","1":"X5","model":"X5","2":"1600000","price":"1600000","3":"NULL","wiki":"NULL","4":"NULL","img":"NULL"},{"0":"Lexus","manufacturer":"Lexus","1":"RX350","model":"RX350","2":"2800000","price":"2800000","3":"NULL","wiki":"NULL","4":"NULL","img":"NULL"}]})
After export project, result don't change. I see empty tables. I can't understand where is my error.

jarrednicholls
10 Aug 2010, 7:02 AM
Are your columns setup with the proper "dataIndex" that matches up to the names of the Store fields?

Radius-Service
10 Aug 2010, 11:38 AM
Yes, I did just as on a video.

jarrednicholls
10 Aug 2010, 12:05 PM
Can you attach your project (.xds) file? I can take a look and quickly see what might be the problem. Thanks!

Radius-Service
10 Aug 2010, 7:59 PM
This is my file - 21888

jarrednicholls
12 Aug 2010, 11:06 AM
Hi Radius,

I checked the project and everything looks fine. Did you right-click on the Store and click "Load Data"? Does it say # records loaded after you do that, and the data still doesn't show? Or are you checking it in the preview/browser? If the latter, you need to make sure the Store has autoLoad set to true, otherwise it will only load the data with an explicit call to the load() function.

Radius-Service
15 Aug 2010, 8:26 PM
I did not see "Load Data". Now data seem in table. Thank you very much for help!

jarrednicholls
16 Aug 2010, 4:26 AM
You bet, no problem!