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

RadMultiPage client-side pageview change after async postback

1 Answer 151 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Pawel
Top achievements
Rank 1
Pawel asked on 09 May 2010, 08:46 AM
Hi,
I'm implementing a project where I'm changing the page views by java script. The RadMultiPage is contained withing an Update panel.
The client side view change works ok until I do an asnychrounous postback with the enclosing update panel.

Here is a code isolating the problem (in my project the page views are added dynamically which does not seem to be a problem here):

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <div> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server"
            <ContentTemplate> 
                <input type="button" onclick="ChangePageView('view1');" value="view1" />&nbsp 
                <input type="button" onclick="ChangePageView('view2');" value="view2" /> 
                <telerik:RadMultiPage SelectedIndex="0" ID="RadMultiPage1" runat="server"
                    <telerik:RadPageView ID="view1" runat="server"
                        page1 
                    </telerik:RadPageView> 
                    <telerik:RadPageView ID="view2" runat="server"
                        page2 
                    </telerik:RadPageView> 
                </telerik:RadMultiPage> 
                <asp:Button ID="PostBackButton" runat="server" Text="DoPostBack" /> 
            </ContentTemplate> 
        </asp:UpdatePanel> 
    </div> 
    </form> 
 
    <script type="text/javascript"
        function ChangePageView(viewID) 
        { 
            var multiPage = $find("RadMultiPage1"); 
            var pageView = multiPage.findPageViewByID(viewID); 
            pageView.select(); 
        } 
    </script> 
</body> 
</html> 
Kind regards,
Pawel



1 Answer, 1 is accepted

Sort by
0
Pawel
Top achievements
Rank 1
answered on 11 May 2010, 02:59 PM
I noticed that this seems to be fixed in Q1 SP1.

regards
Pawel
Tags
TabStrip
Asked by
Pawel
Top achievements
Rank 1
Answers by
Pawel
Top achievements
Rank 1
Share this question
or