Attempting to execute code when a tab is clicked

2 posts, 0 answers
  1. Darrell
    Darrell avatar
    1 posts
    Member since:
    Mar 2013

    Posted 04 Aug Link to this post

    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.

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    278 posts

    Posted 09 Aug Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top