アイテムがデータベースから来ているコンボボックスがあり、そのコンボボックスを使用してフィルターオプションを適用しています...コンボは最初はうまく機能しますが、2回目にコンボボックスからアイテムを選択したいときに問題がありますコンボ内のアイテムを検索します (以前に選択したアイテムのみ)。
this.control({
'combobox[itemId=YourCombo]':
{
select: this.combogridfilter
}
});
combogridfilter: function(newValue){
var value1= Ext.getCmp('myCombo').getValue();
var grid=Ext.getCmp('afteraddingtemplate');
grid.store.load().filter([
{id:'item_code', property:"item_code", value: value1, anyMatch: false}
]);
},
コンボ構成はこちら
xtype:'combo',
id:'myCombo',
itemId:'YourCombo',
action:'change',
fieldLabel:'Select a template',
queryMode:'local',
store:this.store,
name:'item_code',
displayField:'item_code',
valueField:'item_code',
enableKeyEvents: true,
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Select a Template',
selectOnFocus: true