Mar 29, 2012, 3:25 PM
[CLOSED] Interacting with components on the client-side in Ext.NET 2.0
For version 1.x, I had written this (and it worked):
<ext:TextField
ID="txtPassword"
runat="server"
InputType="Password"
FieldLabel="Password"
AnchorHorizontal="100%"
>
<Listeners>
<SpecialKey Handler="if (e.keyCode == 13) { btnLogin.fireEvent('click'); return false; }" />
</Listeners>
</ext:TextField>
Running the same code in version 2.x, I got a JavaScript error saying fireEvent does not exist. So I changed the SpecialKey Handler to this, and now it works fine:<SpecialKey Handler="if (e.keyCode == 13) { Ext.getCmp('btnLogin').fireEvent('click'); return false; }" />
Do I access all client-side controls now using "Ext.getCmp()" now?
Last edited by Daniil; Mar 29, 2012 at 4:42 PM.
Reason: [CLOSED]