Jun 12, 2016, 9:16 AM
How to disable combobox popup when typing
I want to disable popup menus when typing, because the result is empty when typing search string
also want to enable to show popup menu after called direct method
I tried disable listener and other ways but not work.
also want to enable to show popup menu after called direct method
I tried disable listener and other ways but not work.
<ext:ComboBox
ID="SearchBox"
runat="server"
DisplayField="Title"
ValueField="ID"
FieldLabel="Search WorkItem"
AllowBlank="true"
AutoLoad="false"
PageSize="10"
>
<Store>
<ext:Store ID="SearchStore" runat="server" IsPagingStore="true" PageSize="10" >
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Title" />
<ext:ModelField Name="Type" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ListConfig Width="500" Height="300" ItemSelector=".x-boundlist-item">
<Tpl runat="server">
<Html>
<tpl for=".">
<tpl if="[xindex] == 1">
<table class="cbStates-list">
<tr>
<th>ID</th>
<th>Title</th>
<th>Type</th>
</tr>
</tpl>
<tr class="x-boundlist-item">
<td>{ID}</td>
<td>{Title}</td>
<td>{Type}</td>
</tr>
<tpl if="[xcount-xindex]==0">
</table>
</tpl>
</tpl>
</html> </Tpl>
</ListConfig>
<Triggers>
<ext:FieldTrigger Icon="Clear" Hidden="true" />
</Triggers>
<Listeners>
<BeforeQuery Handler="this.getTrigger(0)[this.getRawValue().toString().length == 0 ? 'hide' : 'show']();" />
<TriggerClick Handler="if (index == 0) {
this.focus().clearValue();
trigger.hide();
}" />
<Select Handler="this.getTrigger(0).show();" />
<Disable Handler="this.collapse();"/>
</Listeners>
<RightButtons>
<ext:Button ID="ButtonSearch" runat="server" Icon="Zoom" Handler="function () {#{DirectMethods}.SearchWorkItem();}" />
</RightButtons>
</ext:ComboBox >