Hi, I need to access the components in the edit template of my grid in the Javascript. I saw the code below in a example in the forum, but it's not working for me. My Code:
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
Dim script As String
Session("inEdit") = True
rdcbTipo1 = CType(CType(e.Item, GridEditableItem).FindControl("rdcbTipoFonte1"), RadComboBox)
rdcbTipo1.AutoPostBack = True
script = "client_rdcbTipo1=" & rdcbTipo1.ClientID & ";\n"
Page.ClientScript.RegisterStartupScript(Me.GetType, "clientID", script)
>>>> I tried also : RadAjaxManager1.ResponseScripts.Add(script)
End If
End Sub
I'm using a master page, where I put >>> var client_rdcbTipo1;
In the javascript the client_rdcbTipo1 is undefined. Is there any problem with my code? How I could access the components of my edit template?
Thanks in advance,
Simón de Lizarza
Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
Dim script As String
Session("inEdit") = True
rdcbTipo1 = CType(CType(e.Item, GridEditableItem).FindControl("rdcbTipoFonte1"), RadComboBox)
rdcbTipo1.AutoPostBack = True
script = "client_rdcbTipo1=" & rdcbTipo1.ClientID & ";\n"
Page.ClientScript.RegisterStartupScript(Me.GetType, "clientID", script)
>>>> I tried also : RadAjaxManager1.ResponseScripts.Add(script)
End If
End Sub
I'm using a master page, where I put >>> var client_rdcbTipo1;
In the javascript the client_rdcbTipo1 is undefined. Is there any problem with my code? How I could access the components of my edit template?
Thanks in advance,
Simón de Lizarza