Situation:
I have a RadTooltipManager, containing a web user control (WUC). This WUC in turn contains a number of telerik controls. Among these controls, a RadButton and a RadCalendar. I want to have access to this RadCalendar's selected date property on the client, when clicking the RadButton.
So if I tie an OnClientClicked event to the button and put this event in the WUC. I get a reference error. I'm assuming this is because the <script> portion of the WUC isn't loaded when the button is loaded. (I load the control via Page.LoadControl on the containing page).
If I put the OnClientClicked function on the containing page, it loads just fine. Then comes, however, the problem of referring to the RadCalendar contained in the tooltip and WUC. Usually I'll do a $find() and enter the contorlname.ClientID, but that will give an error here, as the containing page is aware of no such control.
So my next idea was to use the telerik static client side library to get a reference to the control in question. And this seems to work! If I do a $telerik.radControls, I get an array of all the loaded controls on the page. Which seems to include those in the WUC.
How do I get access to the Telerik client side library from one of these objects?
I have a RadTooltipManager, containing a web user control (WUC). This WUC in turn contains a number of telerik controls. Among these controls, a RadButton and a RadCalendar. I want to have access to this RadCalendar's selected date property on the client, when clicking the RadButton.
So if I tie an OnClientClicked event to the button and put this event in the WUC. I get a reference error. I'm assuming this is because the <script> portion of the WUC isn't loaded when the button is loaded. (I load the control via Page.LoadControl on the containing page).
If I put the OnClientClicked function on the containing page, it loads just fine. Then comes, however, the problem of referring to the RadCalendar contained in the tooltip and WUC. Usually I'll do a $find() and enter the contorlname.ClientID, but that will give an error here, as the containing page is aware of no such control.
So my next idea was to use the telerik static client side library to get a reference to the control in question. And this seems to work! If I do a $telerik.radControls, I get an array of all the loaded controls on the page. Which seems to include those in the WUC.
How do I get access to the Telerik client side library from one of these objects?