1
Je veux savoir comment dans la liste déroulante extjs je peux rechercher une valeur. Si j'ai entré 'a' alors une liste d'éléments commençant par un doit être affichée et le sélecteur d'élément doit sélectionner si elle correspond à 'a' i ai essayé beaucoup, mais n'a pas obtenu tout ce qui concerne voici mon code:extjs combo box
var account_details_store = new Ext.data.Store({
id:'acs_store',
reader: new Ext.data.JsonReader({
totalProperty: 'count',
fields: [{
name: 'accountid',
mapping: 'accountid'
},
{
name: 'accountname',
mapping:'accountname'
},
{
name: 'address',
mapping:'address'
},
{
name: 'city',
mapping: 'city'
},
{
name: 'contactnum',
mapping: 'contactnum'
}],
// fields: ['accountid','accountname','address','city','contactnum'],
root: 'rows'
}),
proxy: new Ext.data.HttpProxy({
url: 'accountdetailscombo.php'
}),
autoLoad:true
});
xtype: 'combo',
fieldLabel: 'Account details',
store:account_details_store,
valueField: 'accountid',
displayField:'accountname',
forceSelection:true,
typeAhead: false,
loadingText: 'Searching...',
emptyText: 'Type the first characters of the name',
minChars: 1,
anchor: '100%',
pageSize: 0,
hideTrigger:true,
editable: true,
triggerAction: 'all',
width: 280,
height:250,
tpl: tpl,
itemSelector: 'div.combo-result-item',
onSelect: function(record) {
this.setValue(record.data.accountname);
this.collapse();
// Ext.getCmp('acs_store')
}
Thanku ur répondre mais cette méthode Tapez seulement le premier nom dans la liste .... ce n'est pas ce que je veux – suchita
@suchita: S'il vous plaît désactiver votre clé Caps Lock. –