PDA

View Full Version : [CLOSED] Interacting with components on the client-side in Ext.NET 2.0



MacGarnicle
Mar 29, 2012, 3:25 PM
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?

Daniil
Mar 29, 2012, 4:02 PM
Hi,

Please see #90:
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/

MacGarnicle
Mar 29, 2012, 4:41 PM
Sorry about that - I read through it, but I must have missed it. Thanks.

Daniil
Mar 29, 2012, 4:42 PM
No problem, we are always glad to help.