Tab with matching pageview

2 posts, 0 answers
  1. Jin Developer
    Jin Developer avatar
    24 posts
    Member since:
    Jul 2005

    Posted 04 Nov 2009 Link to this post

    I have a tabstrip control with 5 tabs, and a Multipage object with 5 pageview. So each tab matches one pageview.

    However, if I make the first tab visible=false so that the second tab becomes the first tab, the first pageview is now under the second tab. I can't figure out a way to hide the pageview as well.

    So how do I hide the first tab and also make the pageview matching correctly to its original tab?

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 05 Nov 2009 Link to this post

    The following would set the second tab to be the selected one:

     <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="1" runat="server" MultiPageID="RadMultiPage1" skin="Outlook"  CssClass="NoBg"
       <telerik:RadTab runat="server" Text="Root RadTab1" PageViewID="PageView1"
       <telerik:RadTab runat="server" Text="Root RadTab2" PageViewID="PageView2"
       <telerik:RadTab runat="server" Text="Root RadTab3" PageViewID="PageView3"
    <telerik:RadMultiPage id="RadMultiPage1" runat="server" SelectedIndex="1" Width="400"
      <telerik:RadPageView id="Pageview1" runat="server"
          Name: John Smith<br /> 
          Birthday: October 20th 1976<br /> 
          Marital Status: Single 
          <br /> 
      <telerik:RadPageView id="Pageview2" runat="server"
          Content of the Pageview2 
      <telerik:RadPageView id="Pageview3" runat="server"
          Content of the Pageview3 

    Even if you set the first tab's visibility to false this will show the second tab as the first tab. You essentially tell the TabStrip which index is the selected one, and you also define the RadMultiPage's index to be the same thing.

Back to Top