PDA

View Full Version : Not able to set the Max limit of combobox



vivekajm
22 Feb 2010, 9:41 PM
Hi,
can any one knows how to set the maximum character input for combobox , i need to set the maximum character input for combobox to 75 .Below is the combobox

var searchFieldCombo = new Ext.form.ComboBox( {
id : 'address',
name : 'address',
maxLength:'75',
store : searchFieldStore,
mode : 'remote',
displayField : 'name',
valueField : 'id',
iconClsField: 'icon_airplane',
cls:'destHlpTxt',
listClass:'suggestiveTxt',
plugins:new Ext.ux.plugins.IconCombo(),
minChars:'3',
height : 26,
width:365,
hideTrigger : true,
tabIndex:'2',
emptyText : 'Enter City, Address, Airport, Point of Interest',
forceSelection : false,
selectOnFocus : true,
triggerAction : 'all'
});

Thanks

Corso
23 Feb 2010, 1:51 AM
To make a guess, you used a String not a Number.

vivekajm
23 Feb 2010, 3:28 AM
I had tried both ways but still its not working

var searchFieldCombo = new Ext.form.ComboBox( {
id : 'address',
name : 'address',
maxLength:75,
store : searchFieldStore,
mode : 'remote',
displayField : 'name',
valueField : 'id',
iconClsField: 'icon_airplane',
cls:'destHlpTxt',
listClass:'suggestiveTxt',
plugins:new Ext.ux.plugins.IconCombo(),
minChars:'3',
height : 26,
width:365,
hideTrigger : true,
tabIndex:'2',
emptyText : 'Enter City, Address, Airport, Point of Interest',
forceSelection : false,
selectOnFocus : true,
triggerAction : 'all'
});