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

RadToolTip Manager Control Changing Error

2 Answers 38 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Muhammad
Top achievements
Rank 1
Muhammad asked on 12 Jan 2011, 11:56 AM
Code :

Protected Sub RadToolTipmanager_AjaxUpdate(ByVal sender As Object, ByVal e As ToolTipUpdateEventArgs)
Dim roleName As String = e.Value
        Dim listOfUsersInToolTip As New RadListBox
        Dim label As New Label
        listOfUsersInToolTip.Width = 150
        listOfUsersInToolTip.Height = 200
        If IsUserRole(e.Value) Then
            Dim usersList As ArrayList = rc.GetUserRolesByRoleName(DNN.GetPMB(Me).PortalId, roleName)
            If usersList.Count <> 0 Then
                For Each user As DotNetNuke.Entities.Users.UserRoleInfo In usersList
                    listOfUsersInToolTip.Items.Add(New RadListBoxItem(user.FullName, user.UserID))
                Next
                listOfUsersInToolTip.Sort = RadListBoxSort.Ascending
                listOfUsersInToolTip.SortItems()
                RadToolTipManager.Width = "150"
                RadToolTipManager.Height = "200"
                e.UpdatePanel.ContentTemplateContainer.Controls.Add(listOfUsersInToolTip)




            End If
        Else
            For Each role As RadComboBoxItem In cmbRoleName.Items
                If FindUserInRole(role.Text, e.Value) Then
                    label.Text = e.Value & " belongs to " & role.Text
                    RadToolTipManager.Width = "160"
                    RadToolTipManager.Height = "50"




                    e.UpdatePanel.ContentTemplateContainer.Controls.Add(label)
                    Exit For
                End If
            Next


        End If

Error :

RadToolTipManager response error:
 Exception=Sys.WebForms.PageRequestManagerServerErrorException: An error has occurred because a control with id 'dnn$ctr426$View$ctl00$ctl01' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error.




2 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 13 Jan 2011, 09:46 AM
Hello Muhammad,

I already answered your other thread and for your convenience and for others who might have the same problem I pasted my reply below:

 I am not completely sure what causes the error but I assume that the problem comes from the fact that you do not set an ID to the control you add and thus it takes automatic ID which seems to be the same for different controls. That is why I suggest to set a unique, different ID to the control before you add it to the tooltip manager panel, e.g similar to this:

listOfUsersInToolTip.ID = Guid.NewGuid().ToString()
e.UpdatePanel.ContentTemplateContainer.Controls.Add(listOfUsersInToolTip)

Best wishes,
Svetlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Muhammad
Top achievements
Rank 1
answered on 15 Jan 2011, 12:49 AM
thanks it works ;)
Tags
ToolTip
Asked by
Muhammad
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Muhammad
Top achievements
Rank 1
Share this question
or