I am working with ExtJS MVC and implementing Scheduler.
I want to load my Store in my combo box but it was not load successfully.
My Store is
Ext.define('gantt.store.serviceStore', {
extend: 'Ext.data.Store',
model: 'gantt.model.Service',
storeId: 'serviceStore',
autoLoad: true,
autoSync: true,
proxy: {
type: 'ajax',
api: {
read: 'Event/Get'
},
reader: {
type: 'json',
root: 'data'
},
writer: {
type: 'json',
encode: true,
writeAllFields: true,
root: 'data'
}
}
});
My Model is
Ext.define('gantt.model.Service', {
extend: 'Sch.model.Event',
fields: [{ name: 'ServiceId' },
{ name: 'ServiceName' },
{ name: 'Description' },
{ name: 'Rate' }
],
proxy: {
type: 'ajax',
api: {
read: 'Service/Get'
},
reader: {
type: 'json',
root: 'data'
},
writer: {
root: 'data',
type: 'json',
encode: true,
writeAllFields: true
}
}
});
and My ComboBox Code is below..
this.combo = new Ext.form.ComboBox({
id: 'statesCombo',
store: 'serviceStore',
displayField: 'ServiceName',
valueField: 'ServiceName',
hiddenName: 'ServiceId',
typeAhead: true,
mode: 'local',
fieldLabel: 'Services',
anchor: '100%',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Select a Service',
selectOnFocus: true })
My Problem is when I am Click on combo box my value is not loaded.. and didnt display any Error.