[CLOSED] ComboBox TypeAhead in Each Field Separately

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] ComboBox TypeAhead in Each Field Separately

    Dears,

    Suppose I have the following ComboBox:

    <ext:ComboBox Flex="1" TypeAhead="true" ForceSelection="true"  QueryMode="Local" MinWidth="800" PaddingSpec="0 15 0 5" ID="ddlEditActivityCode" ClientIDMode="Static" ValueField="ID" DisplayField="CODEANDDESC" runat="server" >
    	<Store>
    			<ext:Store ClientIDMode="Static" ID="ddlEditActivityCodeStore" runat="server">
    			<Model>
    				<ext:Model  ClientIDMode="Static" ID="ddlEditActivityCodeModel" runat="server" IDProperty="ID">
    					<Fields>
    						<ext:ModelField Name="ID" Type="String" />
    						<ext:ModelField Name="ACTIVITY_NAME_ENGLISH" Type="String" />
    						<ext:ModelField Name="ACTIVITY_NAME_ARABIC" Type="String" />
    						<ext:ModelField Name="CODEANDDESC" Type="String" />
    					</Fields>
    				</ext:Model>
    			</Model>
    			</ext:Store>  
    	</Store>
    	<ListConfig Width="800" Height="300" ItemSelector=".x-boundlist-item">
    		<Tpl runat="server">
    			<Html>
    				<tpl for=".">
    					<tpl if="[xindex] == 1">
    						<table class="cbStates-list">
    							<tr>
    								<th>Activity Code</th>
    								<th>English Name</th>
    								<th>Arabic Name</th>
    							</tr>
    					</tpl>
    					<tr class="x-boundlist-item">
    						<td>{ID}</td>
    						<td>{ACTIVITY_NAME_ENGLISH}</td>
    						<td>{ACTIVITY_NAME_ARABIC}</td>
    					</tr>
    					<tpl if="[xcount-xindex]==0">
    						</table>
    					</tpl>
    				</tpl>
    			</html>                </Tpl>
    	</ListConfig>
    	<Triggers>
    		<ext:FieldTrigger Icon="Clear" Hidden="true" />
    	</Triggers>
    	<Listeners>
    		<BeforeQuery Handler="var q = queryEvent.query;
    							  queryEvent.query = new RegExp(q);
    							  queryEvent.query.length = q.length;" />
    		<TriggerClick Handler="if (index == 0) {
    								   this.focus().clearValue();
    								   trigger.hide();
    							   }" />
    		<Select Handler="this.getTrigger(0).show();" />
    	</Listeners>
    </ext:ComboBox>
    Now if I perform search with Code, the list get shortening, but when I try to search through English or Arabic the result comes wrong.

    How to achieve the followings:

    1. How to perform search in each field separately, means if I want to search in English only or in Arabic Only with mixing things with each other?

    2. Do you suggest better than this solution? I mean another way to achieve this with another component?

    Regards,
    Ali Alaswad
    Last edited by fabricio.murta; Oct 07, 2016 at 7:48 AM.

Similar Threads

  1. Combobox Typeahead
    By markhenk in forum 2.x Help
    Replies: 1
    Last Post: Feb 08, 2016, 10:35 PM
  2. Replies: 3
    Last Post: Dec 05, 2012, 5:16 PM
  3. [CLOSED] TypeAhead databound combobox
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 27, 2012, 1:28 PM
  4. [CLOSED] Combobox TypeAhead
    By blurken in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 18, 2012, 1:46 AM
  5. Replies: 4
    Last Post: Sep 28, 2011, 8:57 AM

Posting Permissions