PDA

View Full Version : Press Enter key should work on search button



Nagaraju
Mar 11, 2011, 10:11 AM
Hi all,
In my application i am using textfield and button[search].
when i am entering some data and i press Enter key the button action is not working.
can some one help on this.

vinicius
Oct 09, 2011, 5:09 PM
Hi,

You can do this:


<ext:TextField ID="txtBusca" runat="server" Width="200" EnableKeyEvents="true">
<Listeners>
<KeyDown Handler="if (e.keyCode == 13) { Ext.net.DirectMethods.buscar_click(); } " />
</Listeners>
</ext:TextField>
<ext:Button ID="Button5" runat="server" Icon="Zoom" Text="Buscar">
<Listeners>
<Click Handler="Ext.net.DirectMethods.buscar_click();" />
</Listeners>
</ext:Button>