PDA

View Full Version : Using comboParams with ViewSuggest widget



vajra
18 Jul 2008, 6:34 AM
I am using the ViewSuggest widget and it works great. However, I am trying to use the comboParams config object for the Combo, but it does not seem to be working. Here is the code I am using to create the object:

var CNAE = new Ext.nd.form.ViewSuggest(Ext.get('BRCNAE'),{
db: 'BrLookup.nsf',
field: 'CNAELookup',
view: 'CNAETypeAhead',
comboParams: {
minChars: 1,
listWidth: 400,
width: 400,
loadingText: "Carregando..."
}
});

And the ViewSuggest widget has this code:

this.combo = new Ext.form.ComboBox(Ext.apply({
store: this.store,
displayField: this.field,
loadingText: "Loading...",
forceSelection: true,
mode: 'remote',
minChars: 3,
hideTrigger: true,
listWidth: 200,
width: 200,
applyTo: this.el
},this.comboParams));

For some reason, Ext.Apply does not seem to be applying the comboParams config object.

Am I missing something here?

Thanks

mth96a
18 Jul 2008, 6:52 AM
Can you put a "Filter/Search" box at the top of an extnd view, that will filter the first clumn based on whats type in the box? Kind of like the address picker in Lotus Notes? This would be very helpfull

vajra
18 Jul 2008, 10:34 AM
Never mind got it solved. The config object is called comboConfig in my version, not comboParams. :D