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

Visual Earch control inside RadMultiPage

6 Answers 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Warnestam
Top achievements
Rank 1
Warnestam asked on 13 Aug 2008, 09:43 AM
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> 
 

6 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 13 Aug 2008, 10:06 AM
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.
0
Warnestam
Top achievements
Rank 1
answered on 13 Aug 2008, 11:29 AM
Thanks, I'l try it out.

(the changes did not work directly on my sample due to my GetMap methods, but that's ok)
0
Warnestam
Top achievements
Rank 1
answered on 20 Aug 2008, 12:31 PM
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
0
Konstantin Petkov
Telerik team
answered on 20 Aug 2008, 12:47 PM
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.
0
Warnestam
Top achievements
Rank 1
answered on 20 Aug 2008, 04:43 PM
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?


 
0
Konstantin Petkov
Telerik team
answered on 21 Aug 2008, 06:00 AM
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.
Tags
General Discussions
Asked by
Warnestam
Top achievements
Rank 1
Answers by
Paul
Telerik team
Warnestam
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or