This is a migrated thread and some comments may be shown as answers.

TypeError: a.get_postBackElement(...) is undefined

2 Answers 212 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ryan Grossman
Top achievements
Rank 1
Ryan Grossman asked on 04 May 2015, 11:10 AM

I have the AjaxManager on my master page. On the content page the submit buttons on master and content are working fine.

        Dim RadAjaxManager1 As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnSave, pnlError)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnSave, pnlSuccess)

        Dim btnBottom As RadButton = CType(Me.Master.FindControl("btnBottom"), RadButton)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnBottom, pnlError)
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnBottom, pnlSuccess)

When I add the below condition to have one combobox control another I get the error: TypeError: a.get_postBackElement(...) is undefined

     RadAjaxManager1.AjaxSettings.AddAjaxSetting(rcbDivision, rcbApplicationCategory)

 

Works fine without the Ajaxmanagersetting.

Protected Sub Division_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs)
        rcbApplicationCategory.Text = ""
        rcbApplicationCategory.Items.Clear()
        If sender.SelectedValue = "PC" Then
            BindApplicationCategoryPC(rcbApplicationCategory)
        ElseIf sender.SelectedValue = "IN" Then
            BindApplicationCategoryIN(rcbApplicationCategory)
        Else
            rcbApplicationCategory.Enabled = False
        End If
    End Sub

2 Answers, 1 is accepted

Sort by
0
Ryan Grossman
Top achievements
Rank 1
answered on 04 May 2015, 12:01 PM
Setting ClientIDMode="Static" is causing this issue. I have it set like this so I can target focus to the controls easier with labels and javascript css color changes. IS there anyway to have ClientIDMode="Static" on for the controls involved in the situation?
0
Eyup
Telerik team
answered on 06 May 2015, 07:36 AM
Hi Ryan,

Please note that Static IDs are not supported with Telerik controls and therefore you should remove the
ClientIDMode property. Instead, you can try to use findControl and findElement methods if you need to access any control on the client-side:
http://www.telerik.com/forums/javascript-on-each-item#FpwQalBeNkGNGYJoZBJYhg

I am sending a sample RadGrid web site to demonstrate a practical implementation.

Hope this helps.

Regards,
Eyup
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Ajax
Asked by
Ryan Grossman
Top achievements
Rank 1
Answers by
Ryan Grossman
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or