0

I want to know that how in ExtJS MultiSelect ComboBox i can search for a value. Like if i have entered 's' then a list of items starting with a must be displayed and the item selector should select if it matches with 's'.

This is the code i tried.....

    cbCfg = {
      name  : property.columnname,  
      hideOnSelect  : false,  
      triggerAction : 'all',  
      mode      : 'local',  
      width     : comboFieldSize,  
      store     : new Ext.data.SimpleStore({  
          id            : 0,  
          fields        : ['strValue','strText'],  
          data          : data  
      }),  
      listWidth     : 400,  
      valueField        : 'strValue',  
      displayField  : 'strText'  
    };  
    field       = new form.MultiCombo(cbCfg);  

thnkz in advance,

just:-)

4

1 回答 1

0

我假设MultiSelect ComboBox扩展了Ext.form.ComboBox.

您可以尝试使用triggerAction : 'query',这是默认设置 - 它应该过滤掉不匹配的条目。尽管这对用户来说可能有点违反直觉。

另一种可能的方法是添加typeAhead : true属性 - 应该根据用户输入的文本触发建议建议。

于 2012-06-19T11:33:19.700 回答