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

TabStrip Load on Demand help

4 Answers 112 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
elmosi
Top achievements
Rank 2
elmosi asked on 10 Aug 2009, 06:28 AM
Hi, I am trying to create something similar to the "Load on Demand" tab strip example. http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx

My code is exactly the same format as the example with the same events on the same objects. Here is my problem:

1. On load, the first tab is created.
2. I select the second tab.
3. RadMultiPage1_PageViewCreated is called on the first tab
3. RadTabStrip1_TabClick is called on the second  tab.
4. RadMultiPage1_PageViewCreated  is called on the second tab.
5. Click on the 3rd tab.
6. RadMultiPage1_PageViewCreated  is called on first and second tab.
7. RadTabStrip1_TabClick is called on the third tab.

Ok so my problem is, why do all previously created PageViews get created again? When I tried to take out the event OnPageViewCreated event from the RadMultiPage, then all the controls inside the previous PageViews no longer exist when the new tab is loaded. 

I need it to not re-create a PageView once the page is created. 

thanks!

sharon

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Aug 2009, 12:24 PM
Hi Sharon Ip,

This behavior is by design. Since RadMultipage is updated as a whole via Ajax all controls and pageviews that were initialized must be initialized again. Otherwise only the current selected page will be rendered.

Greetings,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
elmosi
Top achievements
Rank 2
answered on 10 Aug 2009, 01:20 PM
Hi, Thanks for the reply. How do you suggest that I could get around this feature?

I want to do a dyanmic load like the example as the content of each tab is quite heavy so I don't want it to be loaded until the user actually needs the tab. But because it's heavy, its not very efficient to re-create previous tabs. As well, if users modified data on the previous tabs, the re-load may cause their changes to be lost. 

Any help is appreciated,

thanks.

sharon
0
Accepted
Atanas Korchev
Telerik team
answered on 10 Aug 2009, 02:06 PM
Hello sharon,

Currently there is no workaround. If you are using the load on demand example as a basis for your implementation you need to create the pageviews always.

A possible workaround is to avoid using the multipage completely - use a placeholder control instead and load the required contents during the TabClick event.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
elmosi
Top achievements
Rank 2
answered on 10 Aug 2009, 04:20 PM
ok cool. thanks! :)
Tags
TabStrip
Asked by
elmosi
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
elmosi
Top achievements
Rank 2
Share this question
or