lundi 22 décembre 2014

How to set empty value to combobox if it has bind property

Hi there!

I have a combobox which looks like this:


{

xtype: 'combobox',

queryMode: 'local',

setLoading: true,

flex: 1,

fieldLabel: 'Content Type',

displayField: 'name',

valueField: 'id',

enableKeyEvents: true,

itemId: 'advSiteCTContentType',

bind: {

value: '{PersistedFormTemplate.TemplateSettings.Persistence.ContentType.Id}'

},

}


So i get value from view model, and i create store and load data from it. Everything works ok but if store does not have record with value that is binded then combobox shows that id, but it should not. Can you explain how can i setup combo that shows only correct values, and if there is no particular record in store then it will be empty.






How to set empty value to combobox if it has bind property

Aucun commentaire:

Enregistrer un commentaire