MasterPage Content Error with Tabstrip

4 posts, 0 answers
  1. Andrew Cao
    Andrew Cao avatar
    12 posts
    Member since:
    May 2010

    Posted 27 May 2010 Link to this post

    I have a few levels of master page each built with tabstrip as link button.
         <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Vista" MultiPageID="RadMultiPage1" SelectedIndex="0" ClickSelectedTab="true">  
                 <Tabs> 
                     <telerik:RadTab Text="Bills" NavigateUrl="ReportParameters.aspx" runat="server" Selected="True" Font-Underline="true" Font-Italic="true" > 
                     </telerik:RadTab> 
                     <telerik:RadTab Text="Reports" NavigateUrl="FlowThroughStart.aspx" runat="server"  Selected="True" Font-Underline="true" Font-Italic="true">  
                     </telerik:RadTab> 
                 </Tabs> 
             </telerik:RadTabStrip> 
     
    <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">  
                 <telerik:RadPageView runat="server" ID="RadPageView1"></telerik:RadPageView>   
                 <telerik:RadPageView runat="server" ID="RadPageView2" ></telerik:RadPageView> 
    </telerik:RadMultiPage>  
    this is the top master page.

    then goes down to here another master page under the one above still built with tabstrip
    <div id="Div1">          
                   <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Vista" MultiPageID="RadMultiPage1" SelectedIndex="0">  
                 <Tabs>  
                     <telerik:RadTab Text="Flow Through" NavigateUrl="FlowThroughStart.aspx" runat="server" Selected="True"  Font-Italic="true" BackColor="Brown" >  
                     </telerik:RadTab>  
                     <telerik:RadTab Text="Rebill" NavigateUrl="RebillStart.aspx" runat="server"  Selected="True"  Font-Italic="true" BackColor="Brown">  
                     </telerik:RadTab>  
                      <telerik:RadTab Text="General" NavigateUrl="GeneralStart.aspx" runat="server"  Selected="True"  Font-Italic="true" BackColor="Brown">  
                     </telerik:RadTab>  
                 </Tabs>  
             </telerik:RadTabStrip>  
     
    <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">  
                 <telerik:RadPageView runat="server" ID="RadPageView1"></telerik:RadPageView>   
                 <telerik:RadPageView runat="server" ID="RadPageView2" ></telerik:RadPageView>  
                 <telerik:RadPageView runat="server" ID="RadPageView3" ></telerik:RadPageView>  
    </telerik:RadMultiPage>  

    while  run this page
    if I select any tab except the first one on the second level, for instance in this case ReBill. The higher level tabstrip which should be Reports displayed as selected will be replaced automaticly with the first tab which is Bills.

    Can someone help me on this . Thank you very much
  2. Andrew Cao
    Andrew Cao avatar
    12 posts
    Member since:
    May 2010

    Posted 27 May 2010 Link to this post

    All Im tring to change here is the Focus on the webpage, could someone help me? thank you
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 01 Jun 2010 Link to this post

    Hi Andrew,

    If you have set the NavigateUrl property to navigate to pages, then you need to select the current tab and its page view from code like this:
    protected void Page_Load(object sender, EventArgs e)
       {
           RadTab currentTab = RadTabStrip1.FindTabByUrl(Request.Url.PathAndQuery);
           if (currentTab != null)
           {          
               currentTab.Selected = true;
               RadMultiPage1.SelectedIndex = currentTab.Index;
           }
       }

    Attached is a simple demo for reference.


    Greetings,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  4. Andrew Cao
    Andrew Cao avatar
    12 posts
    Member since:
    May 2010

    Posted 01 Jun 2010 Link to this post

    Thank you, It works great now.
Back to Top