Current Tab loads again when selecting new tab

5 posts, 0 answers
  1. Lahiru
    Lahiru avatar
    19 posts
    Member since:
    Dec 2012

    Posted 30 Jan 2014 Link to this post

    Hi,

    I have a RadTabStrip control and use a RadMultiPage control inside that. Inside the "OnPageViewCreated" event, I load the relevant user control.

    Let's say, the user in the first tab and if he select the second tab, the "OnPageViewCreated" event will execute with the PageView.ID of the "first" tab. So the first tab will be loaded again, before loading the selected tab. Because of this reason, there is a performance issue. 

    I just wanted to know, how to stop/skip loading the current tab again before loading a new tab?

    Thank you.
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 04 Feb 2014 Link to this post

    Hello Lahiru,

    Please take a look at the following demo here that I believe would be very useful in your current scenario -
    http://demos.telerik.com/aspnet-ajax/tabstrip/examples/multipage/dynamic-pageview-creation/defaultcs.aspx

    Regards,
    Kate
    Telerik
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lahiru
    Lahiru avatar
    19 posts
    Member since:
    Dec 2012

    Posted 05 Feb 2014 in reply to Kate Link to this post

    Hi Kate,

    Thank you for your reply.

    That is exactly what I have implemented. It all works fine, but the issue is: it is getting slower and slower to open new tabs when keep trying to open new ones.

    Here is an example of what is happening.

    Let's say I have 4 tabs. I clicked on tab 1 and it loads perfectly. Now when I click on tab2, it will first load tab1 and then tab2. So when I click on tab3 it first loads tab1, then tab2 and finally tab3. 

    If you place a break point in the "RadMultiPage1_PageViewCreated" method, you will see what I mean.

    I just wanted to know is there a way to prevent it loading the previous tabs? Because it takes some time to load if you have already opened couple of tabs.

    Thank you,
    Lahiru

  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 10 Feb 2014 Link to this post

    Hi Lahiru,

    Try using the RenderSelectedPageOnly="'true" of the RadMultiPage control that will load only the page that you are currently selecting.

    Regards,
    Kate
    Telerik
    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 UI for ASP.NET AJAX, subscribe to the blog feed now.
  6. Lahiru
    Lahiru avatar
    19 posts
    Member since:
    Dec 2012

    Posted 12 Feb 2014 in reply to Kate Link to this post

    Hi Kate,

    I tried this on my RadMultiPage. Now it only loads the selected tab, but all the previously selected tabs are empty. Is this how it work?

    Also, I have RadGrid controls on my page views, but now the grids are not visible.
    Have you seen this behaviour before?

    Thank you,
    Lahiru
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017