Problem loading page with 2 two pageViews

4 posts, 0 answers
  1. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 07 Jan 2013 Link to this post


    Hi,

    I have a tab with 2 tabs, I am using RadMultiPage in combination is RadTab. I have a problem in loading 2nd tab contentUrl Data.
    It always displays first tab Content Url Data.

    Below is Piece of code. Let me know if i am doing anything wrong.

    I have set selectedIndex=0 to display first tab content on load. If i wont set it , Nothing displays. It will be blank.
    Help me out.
    Tab
     <telerik:RadTabStrip ID="rdStrp" runat="server" AutoPostBack="true" SelectedIndex="0" >
            <Tabs>
            <telerik:RadTab Text="First" runat="server" PageViewID="RadPageView1" >
            </telerik:RadTab>
            <telerik:RadTab Text="Second" runat="server" PageViewID="RadPageView2">
            </telerik:RadTab>
            </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage id="Mp" runat="server" SelectedIndex="0" >
            <telerik:RadPageView ID="RadPageView1" ContentUrl="WebForm2.aspx" runat="server">
            </telerik:RadPageView>
             <telerik:RadPageView ID="RadPageView2" ContentUrl="WebForm3.aspx" runat="server">
            </telerik:RadPageView>
            </telerik:RadMultiPage>

    WebForm2.aspx
    ---------------------------
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
     First Tab
        </div>
        </form>
    </body>
    </html>
    WebForm3.aspx
    ---------------------
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
     abcdefd
        </div>
        </form>
    </body>
    </html>

    Regards,
    Akki
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 09 Jan 2013 Link to this post

    Hello Akki,

    I can suggest you to associate the RadTabStrip control with the corresponding RadMultiPage control, with setting the MultiPageID property of the RadTabStrip . Please consider the following implementation, in order to achieve the desired functionality:

    <telerik:RadTabStrip ID="rdStrp" runat="server" AutoPostBack="true" SelectedIndex="0" MultiPageID="Mp">
                    <Tabs>
                        <telerik:RadTab Text="First" runat="server" >
                        </telerik:RadTab>
                        <telerik:RadTab Text="Second" runat="server" >
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="Mp" runat="server" SelectedIndex="0">
                    <telerik:RadPageView ID="RadPageView1" ContentUrl="WebForm2.aspx" runat="server">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView2" ContentUrl="WebForm3.aspx" runat="server">
                    </telerik:RadPageView>
                </telerik:RadMultiPage>


    All the best,
    Nencho
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 09 Jan 2013 Link to this post

    Hi Nencho ,

    Thanks for the reply. Code is working fine.Thanks very much.
      I have one more doubt on this.
      If Tabstrip in combination of RadMultiPage is used , entire page postback will happen, If this radstrip and radmutlpage is used in  usercontrol and if this usercontrol is used in a page, how can avoid a postback of entire page ? Is there way to avoid postback ??

    Please let me know.

    Regards,
    Akki
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 14 Jan 2013 Link to this post

    Hello Akki,

    I can suggest you to simply set the AutoPostBack property of the RadTabStrip control to False. Thus, a PostBack would not be fired when selecting different Tabs.

    Kind regards,
    Nencho
    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.
Back to Top