AUTHOR: Eyup Yusein
DATE POSTED: January 01, 2018
DESCRIPTION When a control is placed within a Content Page, Template or another container which implements INamingContainer interface, its UniqueID and ClientID are modified, thus making it inaccessible on main Page level. The problem is similar when using server-side expressions like <%=txtTrackingNumber.ClientID%> in external JS files, which are not allowed.
SOLUTION While on server-side you can use the FindControl method to access any control in such cases, on client-side it is important to note the difference between the regular HTML element rendered for the specific control and its own Telerik object representation. You will need to get the Telerik instance of the control in order to leverage its built-in API using one of the following approaches:
var
textBox = $telerik.findControl(document.documentElement,
"txtTrackingNumber"
);
<
telerik:RadButton
...
OnClientLoad
=
"buttonLoad"
>
button;
function
buttonLoad(sender, args) {
button = sender;
}
Resources Buy Try