Visual Earch control inside RadMultiPage

7 posts, 0 answers
  1. Warnestam
    Warnestam avatar
    83 posts
    Member since:
    Sep 2006

    Posted 13 Aug 2008 Link to this post

    Hello,

    I've a strange problem while using Visual Earrth control inside a RadMultiPage. For pages that not are visible initial the map display is corrupt. Below is a sample with two views (status and map), only the first view displays the map correctly?

    Any suggestions?

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title>Untitled Page</title> 
    </head> 
    <body onload="GetMap();">  
        <form id="form1" runat="server">  
         <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager> 
        
       <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script>        
    <script type="text/javascript">        
    var map = null;                   
    function GetMap()        
    {           
    map1 = new VEMap('myMap1');           
    map1.LoadMap();     
    map2 = new VEMap('myMap2');           
    map2.LoadMap();     
         
    }           
    </script> 
        
        <div> 
          
        <telerik:radtabstrip id="tsMenu"  runat="server" SkinID="PageMenuSkin" SelectedIndex="0" MultiPageID="rmpMain">  
                    <Tabs> 
                            <telerik:RadTab runat="server" ID="rtStatus" Selected="True" PageViewID="rpvStatus" Text="Status">  
                            </telerik:RadTab> 
                            <telerik:RadTab runat="server" ID="rtMap" PageViewID="rpvMap" Text="Map">  
                            </telerik:RadTab> 
                    </Tabs> 
        </telerik:radtabstrip> 
        <telerik:RadMultiPage ID="rmpMain" Runat="server" SelectedIndex="0">  
                          
                        <telerik:RadPageView ID="rpvStatus" runat="server">  
                            Status...  
                            <br /> 
                            <div id='myMap1' style="position:relative; width:400px; height:400px;"></div> 
     
                        </telerik:RadPageView> 
                          
                        <telerik:RadPageView ID="rpvMap" runat="server">  
                            Map...  
                            <br /> 
                            <div id='myMap2' style="position:relative; width:400px; height:400px;"></div> 
     
                        </telerik:RadPageView> 
                          
                        </telerik:RadMultiPage> 
                          
        </telerik:RadPageView> 
                          
        </div> 
          
          
        </form> 
    </body> 
    </html> 
     
  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 13 Aug 2008 Link to this post

    Hi Warnestam,

    You could easily achieve your goal by simple setting the multipage's RenderSelectedPageOnly property to True. Please note that in order to use the RenderSelectedPageOnly property of the multipage, you have to set the AutoPostBack property of the tabstrip to True as well.

    Kind regards,
    Paul
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Warnestam
    Warnestam avatar
    83 posts
    Member since:
    Sep 2006

    Posted 13 Aug 2008 Link to this post

    Thanks, I'l try it out.

    (the changes did not work directly on my sample due to my GetMap methods, but that's ok)
  5. Warnestam
    Warnestam avatar
    83 posts
    Member since:
    Sep 2006

    Posted 20 Aug 2008 Link to this post

    Hi again,

    I've tried the code and it worked on my primary page. Unfortunatly I have a second page, also containing a map. This page is a bit more complicated and contains a RadAjaxPanel around a RadMultiPage with several views. Again the map is inside a View. Now I get the following error when selecting the tab containing the map: 

    Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolder1_Map1_UP'. If it is being updated dynamically then it must be inside another UpdatePanel.

    Thanks for your time
  6. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 20 Aug 2008 Link to this post

    Hi Warnestam,

    Such errors often popup when the control in question (Map1) is already updated, which means there are two AJAX requests which updates that.

    We recommend using the RadAjaxManager/AJAXProxy pair in Master/ContentPage scenario. You can read more about that in the docs here.

    Sincerely yours,
    Konstantin Petkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Warnestam
    Warnestam avatar
    83 posts
    Member since:
    Sep 2006

    Posted 20 Aug 2008 Link to this post

    I already have a scenario where I'm using a masterpage with a RadAjaxManager. The master also exposes the RadAjaxManaer for the content pages and userconrols. However I do not use any proxies. The map component from Simplovation also uses AJAX, but I don't know how to make it integrate with Telerik. Can it be done even in a complex scenario? Am I using the RadAjaxManager incorrectly?


     
  8. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 21 Aug 2008 Link to this post

    Hello Warnestam,

    Our recommendation is to follow the AJAX Manager / AJAX Manager Proxy approach in a Master/ContentPage scenario if you feel you need an AJAX Manager in a content page or a WebUserControl.

    I should also add that the RadAjax cannot out-of-the-box update all the third-party controls out there. You may find this article on the matter helpful.

    Sincerely yours,
    Konstantin Petkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017