PDA

View Full Version : Issues with dynamic store created through javascript



rishu27
23 Jul 2013, 3:18 AM
With earlier versions we were creating dynamic store like this



1
2
3
4
5
6
7
8
9

var storePayMode = new Ext.data.SimpleStore({
fields: ['value', 'text'],
data: [
['0', 'Annual'],
['1', 'Semi-Annual'],
['2', 'Quarterly'],
['3', 'Monthly']
]
});







This code is not working now. I tried to implement the above functionality with new version but still facing issues.Please let me know where i am wrong in creating store and model.



1
2
3
4
5
6
7
8
9
10
11

var ModelPayMode=Ext.define('ModelPayMode', {
"fields": [
{'value':'0', 'text':'Annual'},
{'value':'1', 'text':'Semi-Annual'},
{'value':'2', 'text':'Quarterly'},
{'value':'3', 'text':'Monthly'}
],"extends": "Ext.data.Model"
});
var storePayMode = new Ext.data.Store({
model:"ModelPayMode"
});







PLEASE HELP!!!!

EPV
23 Jul 2013, 3:52 AM
http://docs.sencha.com/extjs/4.2.1/?mobile=/api/Ext.data.Store

Combine the first 2 examples!

Good luck / E

rishu27
23 Jul 2013, 4:36 AM
Thanks so much EPV :):)