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
Page with the RadGrid-codebehind
Any help would be greatly appreciated.
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.