RadAjaxManager1.FocusControl(RadTextBox1.ClientID);
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load |
| If Session("EmailTempOID").ToString <> "" Then |
| Dim dsEmailTemp As New DataSet |
| dsEmailTemp = [ClientEmailTemplates].GetEmailTempById(Session("EmailTempOID").ToString) |
| tbEmailTempName.Text = dsEmailTemp.Tables(0).Rows(0).Item(1).ToString |
| reEmailTemplateBody.Content = dsEmailTemp.Tables(0).Rows(0).Item(2).ToString |
| Else |
| tbEmailTempName.Text = "" |
| reEmailTemplateBody.Content = "" |
| End If |
| End Sub |
| Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs) |
| Dim index As Integer = args.TargetControlID.LastIndexOf("_") |
| Dim elementID As String = args.TargetControlID.Substring(index + 1) |
| Session("EmailTempOID") = elementID |
| Me.UpdateToolTip(elementID, args.UpdatePanel) |
| End Sub |
| Private Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel) |
| Dim ctrl As Control = Page.LoadControl("UserControls/AddTemplate.ascx") |
| panel.ContentTemplateContainer.Controls.Add(ctrl) |
| End Sub |
| <script type='text/javascript' >function SetVerifyFocus(){$get('<%=GetVerifyClientID() %>').focus();}</script> |
| <script type='text/javascript' >function SetVerifyFocus(){alert('<%=GetVerifyClientID() %>');}</script> |

Hi,
I would like to use a javascript function to initialize some controls (a number of RadComboBoxes and a RadTreeView) with cached reference data values on the client - I have tried using the RadAjaxPanel's ResponseScripts property to call my initialize function however the problem I am encountering is that the initialize function is called before the controls have been created via a number of:
Sys.Application.add_init(function() { $create(Telerik.Web.UI.RadComboBox,{....;
etc
My question - is there any method whereby I can ensure that my initialize function call will be added as the last piece of script to the page so that when it is called all the telerik components will have been created.
Regards, MPC.

| function AfterClientClickHandler(treeView, args) |
| { |
| var oNode = args.get_node(); |
| var attributes = oNode.get_attributes(); |
| if (attributes.getAttribute("Level") == "Item") |
| { |
| bIndexGridPop = false; |
| bAssociatedGridPop = false; |
| bAuditGridPop = false; |
| ViewSelectedItem(attributes); |
| myViewer.OpenUrl(attributes.getAttribute("ItemPath")); |
| myThumb.OpenUrl(attributes.getAttribute("ItemPath")); |
| iCurrentPage = -1; |
| } |
| else |
| { |
| } |
| } |

