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

Attempting to execute code when a tab is clicked

1 Answer 66 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Darrell
Top achievements
Rank 1
Darrell asked on 04 Aug 2016, 02:43 PM

I am working on an web page that uses the RadTabStrip, RadTab,RadMultiPage, and RadPageView objects.

There are four tabs. The first three tabs contain various RadText, RadDropDownList, and RadListBox objects for the user to enter information. On the first page, when the user enters an ID number, a server call populates information currently on file for that number. That works without any issues. 

My problem is when the third tab is selected, I need to call a server routine that will use information entered from the first two tabs to populate the RadDropDownList and RadListBox objects on that page. The code I have written is being executed, but when it returns, the third tab is not selected and the page view of that tab is not displayed. Instead you still see the last tab that was active. In addition if the last tab was tab one, then clicking on tab two results in tab two being displayed and the contents of tab one being displayed under it.

I am calling my routine from the OnTabClick event of the RadTabStrip:

       

<telerik:RadTabStrip RenderMode="Lightweight" runat="server" ID="RadTabStrip1"  MultiPageID="RadMultiPage1" SelectedIndex="0" Skin="Silk" AutoPostBack="true"  OnTabClick="tabViewChanged"  >

Is there something I need to do at the end of my code to have the page view display? I tried this:

RadTab tab1 = RadTabStrip1.Tabs.FindTabByText("Benefits");
tab1.Selected = true;
tab1.PageView.Selected = true;

but it did not appear to have any effect.

I am hoping there is just some type of render call that I am missing.

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 09 Aug 2016, 06:41 AM
Hi Darrell,

As this forum thread is on the same topic as the Support ticket that you have opened, I would suggest you to continue our communication in the other thread.

Regards,
Veselin Tsvetanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
TabStrip
Asked by
Darrell
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or