Tabstrip & Mulitpage View in different content placeholders

2 posts, 1 answers
  1. Ronnie
    Ronnie avatar
    23 posts
    Member since:
    Apr 2008

    Posted 25 Jul 2008 Link to this post

    Is it possible to control a multipage view that is in one content place holder with a tabstrip in another content place holder?  For instance, I have this code:

    <

    asp:Content ID="Content1" ContentPlaceHolderID="chp1" Runat="Server">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="multipageProfile" SelectedIndex="1">
            <Tabs>
                <telerik:RadTab runat="server" Text="View Profile">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="View Pics" Selected="True">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
    </
    asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="chp2" Runat="Server">
        <telerik:RadMultiPage ID="multipageProfile" runat="server" SelectedIndex="1">
            <telerik:RadPageView ID="viewProfile" runat="server">
            Profile Page
            </telerik:RadPageView>
            <telerik:RadPageView ID="viewPics" runat="server">
            Pics Page
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </
    asp:Content>

    The problem is that if the multipage view is in ContentPlaceHolder "chp2", it does not allow the tabstrip to control it.  It works perfect if I move the multipage to "chp1".

    Thanks for the help.

  2. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 28 Jul 2008 Link to this post

    Hello Ronnie,

    In order to achieve your goal you will have to set the tabstrip's MultiPageID to the UniqueID of the multipage control (in code benind only).

    ASPX:
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">  
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="multipageProfile" SelectedIndex="1">  
            <Tabs> 
                <telerik:RadTab runat="server" Text="View Profile">  
                </telerik:RadTab> 
                <telerik:RadTab runat="server" Text="View Pics" Selected="True">  
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 
    </asp:Content> 
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">  
        <telerik:RadMultiPage ID="multipageProfile" runat="server" SelectedIndex="1">  
            <telerik:RadPageView ID="viewProfile" runat="server">  
                Profile Page  
            </telerik:RadPageView> 
            <telerik:RadPageView ID="viewPics" runat="server">  
                Pics Page  
            </telerik:RadPageView> 
        </telerik:RadMultiPage> 
    </asp:Content> 

    Code-behind:
    protected void Page_Load(object sender, EventArgs e)  
        {  
            RadTabStrip1.MultiPageID = multipageProfile.UniqueID;  
        } 


    Best wishes,
    Paul
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top