PDA

View Full Version : Need help in loading jason data into grid panel



ssyeda
6 May 2009, 7:05 AM
Hi all,

var jSource = {"success":true,"result":{"count":2, "records":[{"company":"Company1","company1":"Company1","price":"3.00" },
{"company":"Company2","company1":"Company2","Price":"3.50"}]}};

var company = Ext.data.Record.create([
{ name:'company'},
{ name:'company1'},
{ name:'price'},
]);

var myReader = new Ext.data.JsonReader({
root: 'result.records'
},company );

var store1 = new Ext.data.Store({reader: myReader});
store1.loadData(jSource);

I am trying to load jason data into grid panel locally but I am getting object not found error. Please help me !!!!!!!!!!!!.

thanks
Sakina