PDA

View Full Version : combobox drop down list filter issue



sandy52
12 May 2014, 11:19 PM
Hi,
I want combobox which will show match record what i have written in input field, but its not working . my code is :


Ext.define('LIB.UX.DinerwareComboBox', {
extend: 'Ext.panel.Panel',
alias: 'widget.dinerwareComboBox',
border: false,
width: 400,
height:'auto',
initComponent: function () {
var me = this;
me.mnuItem = Ext.create('HO.store.MenuItemData', {
//pageSize: 5,
filters: [
{ id: 'MenuActive', property: 'Active', operator: 'eq', value: 1, disabled: false },
{ id: 'ParentCnt2', property: '(ParentCount eq null)', operator: 'function', value: '', disabled: false },
]
}).load();
{
xtype: 'combobox',
store: me.mnuItem,
// valueField: 'LongName',
displayField: 'LongName',
width: '100%',
hideTrigger: true,
cls: 'fresh-sheet-cmb-body',
fieldCls: 'fresh-sheet-cmb-style',
emptyText: 'add to fresh sheet',
queryMode: 'remote',
queryParam:'LongName',
typeAhead: true,
forceSelection: true,
minChars:1,
enableKeyEvents: true,
}
]
me.callParent(arguments);
});




Thanks & Regards,
sandeep

Zinnia
13 May 2014, 3:16 AM
Add Filter to your store , it will work

combo.getStore().filter("key" , value)