PDA

View Full Version : combo box help



alex1001
24 Feb 2010, 9:54 AM
Hi All,

Im new to ExtJS , used it for a few weeks last year, and started using it again today. A quick question about combo box.

In HTML - a drop down list , when a selection is chosen , the user can go back and select a different option.

In ExtJS when I create a combo box to simulate similar behaviour when a user selects an option, then tries to reselect a different option, the drop down is not available until the user deletes the first entry in the box. The drop down arrow is still there but it does not show the complete list until the user first deletes whats in the entry box.

Is there a way to always show all possible values even if user has seleted an option ?

Cheers,

ALex.

fay
24 Feb 2010, 9:58 AM
You need to post some code showing how your combobox is created. It's probably one of the config options.

alex1001
24 Feb 2010, 10:04 AM
The code (Its just example stuff from a book im using to learn Extjs):



var genres = new Ext.data.SimpleStore({
fields: ['id', 'genre'],
data: [
['1', 'Comedy'],
['2', 'Drama'],
['3', 'Action']ng
]
});

Ext.QuickTips.init();

var movie_form = new Ext.FormPanel({
url: 'movie-form-submit.php',
renderTo: document.body,
frame: true,
title: 'Movie Information Form',
width: 250,
items: [{
xtype: 'textfield',
fieldLabel: 'Title',
name: 'title'
},
{
xtype: 'textfield',
fieldLabel: 'Director',
name: 'director'
},
{
xtype: 'datefield',
fieldLabel: 'Released',
name: 'released',
allowBlank: false
},
{
xtype: 'radio',
fieldLabel: 'Filmed In',
name: 'filmed_in',
boxLabel: 'Color'
},
{
xtype: 'radio',
hideLabel: false,
labelSeparator: '',
name: 'filmed_in',
boxLabel: 'Black & White'
},
{
xtype: 'checkbox',
fieldLabel: 'Bad Movie',
name: 'bad_movie'
},
{
xtype: 'combo',
name: 'genre',
fieldLabel: 'Genre',
mode: 'local',
store: genres,
displayField: 'genre',
width: 120
}]
});

fay
24 Feb 2010, 10:07 AM
Try:


// ...
mode: 'local',
triggerAction: 'all',
// ...

alex1001
24 Feb 2010, 10:17 AM
Thanks, Thats what I was looking for!!!!


Try:


// ...
mode: 'local',
triggerAction: 'all',
// ...