For example:
editCityStore.load({ params: { provinceID: proid });
Ext.getCmp('city-id-name').setValue(cityid);
Since the store is loaded asynchronously, it will assign the value first and then fill in the value To ComboBox, you need to use here:
Assign value after loading is complete:
editCityStore.load({
params: { provinceID: proid },
callback: function () {
//Waiting for data to load The value is assigned only after completion, otherwise due to asynchronous operation, the value will be assigned first and then loaded.
Ext.getCmp('city-id-name').setValue(cityid);
},
scope: editCityStore,/ /Indicates the scope
add: false //false means the data is not accumulated
});
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn