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

RadToolTipManager not updating dynamically added control

1 Answer 110 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 25 Feb 2008, 09:15 PM
I have RadGrid where I dynamically add an edit button to each row that opens a tooltip which in turn loads a usercontrol.  When I click on the edit link in the datagrid, it opens up the tooltip however the values in the edit form are always the first row selected. The tooltip only shows the data for the first row that I click on regardless of whcih row I click.

When I run it through with debugging, the tbEmailTempName.Text show to have the correct values but they are not appearing in the tooltip loaded screen. Very confused as to why it appears like all the values are coming through but the screen is not showing the updated data.

Below is some of the codes to help explain the issue.

My usercontrol that loads in the ToolTipManager
 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 


Page with the RadGrid-codebehind
 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 

Any help would be greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Anthony
Top achievements
Rank 1
answered on 27 Feb 2008, 11:55 AM
This issue was resolved in the following discussion thread.

http://www.telerik.com/community/forums/thread/b311D-hkmga.aspx
Tags
ToolTip
Asked by
Anthony
Top achievements
Rank 1
Answers by
Anthony
Top achievements
Rank 1
Share this question
or