[FIXED] [#1262] [3.3] Lost Focus Listener and Input Mask

Threaded View

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

    [FIXED] [#1262] [3.3] Lost Focus Listener and Input Mask

    Dears,

    I'm using ext:GridPanel ext:RowEditing plugin, and I'm using the first field selection from the ext:ComboBox to fill other edited fields.

    I defined the field as follows:

    <ext:Column runat="server" Width="130" Align="Center" Text="Activity Code" DataIndex="RECEIPT_ACT_A" >
    	<Editor>
    		<ext:ComboBox Flex="1" EnableRegEx="true" QueryMode="local" AllowBlank="false" TypeAhead="true"  MinWidth="150" PaddingSpec="0 15 0 5" ID="ddlEditReceiptActivityCode" ClientIDMode="Static" ValueField="RECEIPT_ACT_A" DisplayField="RECEIPT_ACT_B" runat="server" >
    			<Store>
    			   <ext:Store AutoLoad="false" ClientIDMode="Static" ID="ddlEditReceiptActivityCodeStore" runat="server">
    					<Model>
    						<ext:Model ID="ddlEditReceiptActivityCodeModel" runat="server" IDProperty="RECEIPT_ACT_A">
    							<Fields>
    								<ext:ModelField Name="RECEIPT_ACT_A" Type="String" />
    								<ext:ModelField Name="RECEIPT_ACT_B" Type="String" />
    								<ext:ModelField Name="RECEIPT_ACT_C" Type="String" />
    								<ext:ModelField Name="RECEIPT_ACT_D" Type="String" />
    								<ext:ModelField Name="RECEIPT_ACT_E" Type="String" />
    								<ext:ModelField Name="RECEIPT_ACT_F" Type="String" />
    							</Fields>
    						</ext:Model>
    					</Model>
    				</ext:Store>  
    			</Store>
    			<Listeners>                                                                           
    				<SpecialKey Handler="if(e.getKey() == 9) { autoFillReceiptInfo(); }" />
    			</Listeners>                                                                                                                          
    		</ext:ComboBox>
    	</Editor>
    </ext:Column>
    The listener is working fine with me and did the job, but it only worked when you hit Tab button to move to second field, means when I use mouse cursor to move to second field, the trigger not fired.

    1. How to impalement "lost focus" listener instead of SpecialKey for the ext:ComboBox .

    Also, I want to define an input mask for ext:TextField to display prices with comma delimiter for receipts as follows:

    <ext:TextField ID="txtTotalAmount" ReadOnly="true" Text="0" LabelWidth="180" ClientIDMode="Static"  runat="server" Flex="1" FieldLabel="Total Amount" LabelAlign="Left" >
    	<Plugins>
    		<ext:InputMask runat="server" Mask="999,999,999,999,999" />
    	</Plugins>                                                                    
    </ext:TextField>
    It give me error "NaN" if I set the value to 35213.215 dollar.

    App.txtTotalAmount.setValue("35213.215");
    2. How to build a mask for the prices?

    Regards,
    Alaswad
    Last edited by fabricio.murta; Feb 20, 2016 at 3:05 AM.

Similar Threads

  1. [CLOSED] Input mask
    By barnali in forum 3.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 14, 2015, 9:27 AM
  2. Textfield - listener causing focus to be lost???
    By Tbaseflug in forum 2.x Help
    Replies: 3
    Last Post: Apr 10, 2013, 4:04 PM
  3. [CLOSED] Mousewheel scrolling cause input data lost in grid editor
    By kwcitadmin in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 25, 2013, 2:07 AM
  4. why ComboBox can‘t lost focus
    By ShengXQ in forum 2.x Help
    Replies: 3
    Last Post: Jan 10, 2013, 8:53 AM
  5. How to get row focus/selection lost event?
    By reezvi in forum 1.x Help
    Replies: 10
    Last Post: Jul 31, 2011, 8:41 PM

Posting Permissions