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

Current Tab loads again when selecting new tab

4 Answers 20 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Lahiru
Top achievements
Rank 1
Lahiru asked on 30 Jan 2014, 02:37 PM
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.

4 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 04 Feb 2014, 02:09 PM
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.
0
Lahiru
Top achievements
Rank 1
answered on 05 Feb 2014, 10:13 AM
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

0
Kate
Telerik team
answered on 10 Feb 2014, 09:18 AM
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.
0
Lahiru
Top achievements
Rank 1
answered on 12 Feb 2014, 08:30 AM
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
Tags
TabStrip
Asked by
Lahiru
Top achievements
Rank 1
Answers by
Kate
Telerik team
Lahiru
Top achievements
Rank 1
Share this question
or