Hello.I have a WebNumericEdit in a datalist in a Content form.In the code behind I use the ClientID property of the WNE to write it out to the client script.So the ID that's written out is ctl00_ContentPlaceHolder1_dlIncludedItems_ctl01_txtIncludedQty
But the actual ID that I need to reference in javascript is igtxtctl00_ContentPlaceHolder1_dlIncludedItems_ctl01_txtIncludedQty. That is, ctl00_ContentPlaceHolder1_dlIncludedItems_ctl01_txtIncludedQty with "igtxt" prepended to it.
I've hardcoded "igtxt" in the code-behind so that I can get at the object (WNE), but I don't like to hardwire anything.
So my question is, in the code-behind, what combination of properties, etc do I use to get the full name, igtxtctl00_ContentPlaceHolder1_dlIncludedItems_ctl01_txtIncludedQty?
Thanks in advance,
Mike
Hi,
The $find if AJAX Extensions function and it can find only javascript objects which extend Sys.UI.Control (maybe some other AJAX objects).The WebTextEdit and all other Infragistics.WebUI controls do not extend Sys.UI.Control.
I was using IG's $find() function and it wasn't finding it.
Hi Mark,
If you need to use getElementById, then you may keep your hard coded value.
The id of main element of WebTextEdit uses private structure, which has prefix igtxt. For public support for that element you should use member variable Element. For example, if you process any ClientSideEvents (let say, Initialize), then you may
function webTextEditInitialize(oEditor){ var elemMain = oEditor.Element;//can be TABLE or INPUT var elemInput = oEditor.elem;//can be same as Element window.alert('Id of main elem=' + elemMain.id);}