May 20, 2013, 3:19 AM
Ext.getCmp() by ClientID problem
I have a JS function to get a ext component by it ClientID but fail.
First set the Client ID in the code behind:
But by inserting break point in JS, it will be run right if txtNoFr.ClientID = "tbrDocNo_txtNoTo"
Why the ClientID have a prefix of "App." what is it stand for?
I also try to clientIDMode to AutoID in Web.config, but get the same result.
First set the Client ID in the code behind:
txtNoTo.Listeners.BeforeRender.Handler = "this.txtFrId='" + txtNoFr.ClientID + "'";
Then in JS: var txtFr = Ext.getCmp(sender.txtFrId);
The problem is the txtNoFr.ClientID = "App.tbrDocNo_txtNoTo"But by inserting break point in JS, it will be run right if txtNoFr.ClientID = "tbrDocNo_txtNoTo"
Why the ClientID have a prefix of "App." what is it stand for?
I also try to clientIDMode to AutoID in Web.config, but get the same result.
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode ="AutoID">
<controls>
<add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext"/>
</controls>
</pages>
Can anyone help? Thanks.