TabStrip Load on Demand help

5 posts, 1 answers
  1. elmosi
    elmosi avatar
    11 posts
    Member since:
    Jul 2009

    Posted 10 Aug 2009 Link to this post

    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
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Aug 2009 Link to this post

    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.
  3. elmosi
    elmosi avatar
    11 posts
    Member since:
    Jul 2009

    Posted 10 Aug 2009 Link to this post

    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
  4. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Aug 2009 Link to this post

    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.
  5. elmosi
    elmosi avatar
    11 posts
    Member since:
    Jul 2009

    Posted 10 Aug 2009 Link to this post

    ok cool. thanks! :)
Back to Top