This is a migrated thread and some comments may be shown as answers.

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

3 Answers 52 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 25 May 2012, 01:46 AM
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.

-GP

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 28 May 2012, 02:24 PM
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.
0
Accepted
Kevin
Top achievements
Rank 2
answered on 29 May 2012, 01:36 PM
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.
0
Greg
Top achievements
Rank 1
answered on 31 May 2012, 06:24 PM
Excellent!  Your response worked.  Thank-you very much for your help!
Tags
TabStrip
Asked by
Greg
Top achievements
Rank 1
Answers by
Peter
Telerik team
Kevin
Top achievements
Rank 2
Greg
Top achievements
Rank 1
Share this question
or