View Full Version : ComboBox Auto selection not working properly

11 Aug 2010, 7:30 AM
Hi I'm using Two combo boxes 1)Category_combo2)SubCategory_combo. Based on the first combo resp second combo values are getting loaded. Upon the values in second combo when I type a alphabet say 'g' rsp values starting with letter 'g' should populate and this is doing good @ some point and some point its not working (i.e it reverts back to beginning of the List).where i need to drop the menu and manually type the subCategory. Can any one pls help me n it ?
My code is as below.

var subcategoryds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: contextPath + "/qs?op=getSubCategory&mastCategory=" + defaultSubCatValue
reader: new Ext.data.JsonReader({
root: 'SubCats',
id: 0
}, [{
name: 'actId',
mapping: 'actId'
}, {
name: 'actDescription',
mapping: 'actDescription'
var subCategoryCombo = new Ext.form.ComboBox({
store: subcategoryds,
typeAhead: true,
mode: 'local',
triggerAction: 'all',
editable: true,
selectOnFocus: false,
valueField: 'actId',
displayField: 'actDescription',
fieldLabel: "Sub Category <font color='red'>*</font>",
hiddenName: 'subCategoryDetails',
anchor: '65%',
tabIndex: 5,
minChars: 1,
allowBlank: false,
queryDelay: 10,
tpl: '<tpl for="."><div ext:qtip="{actDescription}" class="x-combo-list-item">{actDescription}</div></tpl>'