PDA

View Full Version : Remote Loaded Combobox - Cant remove invalid selection on type



shaoen01
24 Oct 2011, 12:01 AM
Hi,

I added a combo box onto my grid for each row. The combo box is remotely populated from the contents in my MySQL database. So i allow user to type into the combo box and some selections should be not seen as you type (provided the text you type can be found). Similar to the combo example. http://dev.sencha.com/deploy/ext-4.0.2a/examples/form/combos.html

My remotely loaded combo box has the autocomplete switched on, but those selections that are not valid based on what is being typed can still be seen. Has anyone encountered this? Hopefully, i am making some sense here.

My code below:


text: "Status",
dataIndex: 'statuscode',
width: 100,
id: 'statuscode',
//flex: 1,
hidden: false,
sortable: true,
renderer: function(value, metadata, record) {
return record.get('statuscode');
},

field: {
xtype: 'combobox',
id: "statusdesccombo",
typeAhead: true,
triggerAction: 'all',
selectOnTab: true,
store: statustypestore,
displayField: 'statuscode',
//valueField: 'userid',
lazyRender: true,
allowBlank:false,
listClass: 'x-combo-list-small',
msgTarget: 'side',
queryMode: 'remote',
listeners: {
scope: this,
select: function(field, value, options)
{

}
}//end listener

}

shaoen01
24 Oct 2011, 12:16 AM
I think i just answered my own question, but just to share with everyone. I added ---> queryMode: 'local'
into my combobox field. And it worked like a charm.