使用组合框,当展开并按字符键选择另一个值时,它显示选择值但按回车键它会缩小列表但选择最后一个值。
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>