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

Add Google Map inside a ToolTip

1 Answer 55 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Emmanuel
Top achievements
Rank 1
Emmanuel asked on 22 Mar 2013, 10:24 AM
Hello,
I would like add google map inside a tootip but its dont work.
I use :
Protected Sub OnAjaxUpdate(sender As Object, args As ToolTipUpdateEventArgs)
            Me.UpdateToolTip(args.Value, args.UpdatePanel)
 
        End Sub
 
        Private Sub UpdateToolTip(elementID As String, panel As UpdatePanel)
            Dim ctrl As Control = Page.LoadControl("~/desktopmodules/catalookstore/skins/" & New StoreAdminInfo(PortalSettings.PortalId).Skin & "/_IciRelaisDetail.ascx")
            panel.ContentTemplateContainer.Controls.Add(ctrl)
            Dim details As IciRelaisDetails = DirectCast(ctrl, IciRelaisDetails)
            details.PUDO_ID = elementID
        End Sub

in _icirelaisdetails.ascx i cant add javascript for load map.
Nothing javascript is running on tooltip ?

I'm testing with :
<%@ Control Language="vb" AutoEventWireup="false" Inherits="CATALooK.IciRelaisDetails" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
 
<table runat="server" style="width: 100%" id="ProductWrapper" border="0" cellpadding="2"
     cellspacing="0">
     <tr>
          <td style="text-align: center;">
               <asp:FormView ID="FormViewPUDO"  DataKeyNames="PUDO_ID"  runat="server" >
                    <ItemTemplate>
                         <asp:Label  ID="LabelPUDO_ID" runat="server">Code identifiant de l'espace ICI relais : <%# Eval("PUDO_ID")%></asp:Label>
                         <asp:Label  ID="LabelNAME" runat="server"><%# Eval("NAME")%></asp:Label>
                        
                         <asp:Label ID="LabelADDRESS1" runat="server" Text='<%# Eval("ADDRESS1")%>'></asp:Label>
                       <asp:Label ID="LabelADDRESS2" runat="server" Text='<%# Eval("ADDRESS2")%>'></asp:Label>
                       <asp:Label ID="LabelADDRESS3" runat="server" Text='<%# Eval("ADDRESS3")%>'></asp:Label>
                      <asp:Label ID="LabelZIPCODE" runat="server" Text='<%# Eval("ZIPCODE")%>'></asp:Label>
                      <asp:Label ID="LabelCITY" runat="server" Text='<%# Eval("CITY")%>'></asp:Label>
                        <div id="map-canvas" style="width: 100%; height: 100%"></div>
                    
 
                    </ItemTemplate>
               </asp:FormView>
          </td>
     </tr>
     
</table>
 
<script type="text/javascript">
    (function ($) {
        $(document).ready(function () {
            alert("Hooray! The document is ready!");
        }
   );
    })($telerik.$);
</script>

How resolve this issue ?
Thank you !
Manu

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 Mar 2013, 09:27 AM
Hello Manu,

This is a limitation that comes from the framework. Scripts in the markup of user controls that are loaded via AJAX (which is what RadTooltipManager does) are not parsed and executed. This is overcome by registering the script from the code-behind:
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.registerstartupscript.aspx - for the general idea and
http://msdn.microsoft.com/en-us/library/bb310408.aspx that I have found to work best.

Perhaps an easier approach would be to have an entire page for the maps and use RadWindow(s) to load it.


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ToolTip
Asked by
Emmanuel
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or