Dynamically added PageViews lose content

2 posts, 0 answers
  1. Romi Lungulescu
    Romi Lungulescu avatar
    1 posts
    Member since:
    Nov 2009

    Posted 13 Nov 2009 Link to this post

    I have a tabstrip linked to a RadTreeView via the RadAjaxManager. On a node click handler on server side, I add a new tab and a new PageView with some content on, then I select them:

                    tab.Selected = true;  
                    // only now select the pageview; apparently it needs the tab selected first.   
                    pageView.Selected = true;  

    That works fine, except for any existing tab and PageView that were created on previous node clicks. Those PageViews lose their content.
    I tried disabling postback for those tabs, on client side in the node click event, on server side, even both - without any effect.

    What am I missing?

  2. Paul
    Paul avatar
    4281 posts

    Posted 16 Nov 2009 Link to this post

    Hi Romi,

    In order to achieve your goal you will have to use the multipage PageViewCreated event to persist the dynamically created controls inside a RadPageView. Please refer to these examples for details on the matter.

    TabStrip / Dynamic RadPageView
    TabStrip / Load on Demand RadPageView

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top