使用组合框,当展开并按下一个字符键以选择另一个值时,它会显示选择值,但是按回车键按下它缩小列表但选择最后一个值。
keypress不支持在extjs 4中输入键操作。
<ext:ComboBox ID="CmbState" runat="server" StoreID="StoreState" Editable="false"
HideMode="Offsets" QueryMode="Local" DisplayField="Text" ValueField="Value" TypeAhead="true"
ForceSelection="true" TriggerAction="All" EnableKeyEvents="true" EmptyText="Select a State..."
TabIndex="3">
<SelectedItems>
<ext:ListItem Value="Please Select....." />
</SelectedItems>
<DirectEvents>
<Select OnEvent="FillDropdowns">
<EventMask Msg="Updating Carriers. Please wait..." ShowMask="true" />
</Select>
</DirectEvents>
<Listeners>
<Select Handler="Combo_selectedIndexChanged(this);" />
<KeyDown Handler="return Combofilter(#{CmbState},'Text','Value',e);" />
</Listeners>
</ext:ComboBox>