I can get the tab to select, but not the form underneath.

4 posts, 1 answers
  1. Greg
    Greg avatar
    8 posts
    Member since:
    Apr 2012

    Posted 24 May 2012 Link to this post

    Hi Telerik forum people.   Maybe you have some ideas I can try.

    I have a TabStrip with 7 tabs.  One of the tabs has a Text property value of "Documents."  I'm trying to get the page that contains this TabStrip to load with the Documents tab showing.  So far, I've been able to get the Documents tab label at the top of the TabStrip to show up, but I can't get the form inside that tab to show up.  Instead, I get the form from a different tab (the first tab, actually) to show up.

    I'm basically using this code to get the Documents tab to show up:

    RadTab documentsRadTab = mainTmTabStrip.TabStrip.Tabs.FindTabByText("Documents");
    documentsRadTab.Selected = true;
    mainTmTabStrip.TabStrip.SelectedIndex = documentsRadTab.Index;

    I've looked all over the API and at forum posts and elsewhere on-line, and... I feel as though at this point I'm a little spun-around, dizzy from trying to find the solution.  Can you provide some ideas that I could try out?  Thanks very much for your time and ideas.

  2. Peter
    Peter avatar
    6637 posts

    Posted 28 May 2012 Link to this post

    Hi Greg,

    Please, review the RadMultiPage demo. Note that instead of putting controls or HTML in the page view you can use its ContentUrl property to directly load a page in it

    Kind regards, Peter
    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. DevCraft R3 2016 release webinar banner
  4. Answer
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 29 May 2012 Link to this post

    Hello Greg,

    Just setting the SelectedIndex of the RadTabStrip will not propagate the change to the RadMultiPage. In order for the form associated with the tab to show, you will need to set the SelectedIndex of the RadMultiPage as well. So for example, if I wanted the second tab to be selected when the form loads, I would do something like this:

    RadTabStrip1.SelectedIndex = 1;
    RadMultiPage1.SelectedIndex = 1;

    This assumes the order of the tabs and the pageviews are the same, so there index would be the same as well.

    I hope that helps.
  5. Greg
    Greg avatar
    8 posts
    Member since:
    Apr 2012

    Posted 31 May 2012 Link to this post

    Excellent!  Your response worked.  Thank-you very much for your help!
Back to Top