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

Dynamically added PageViews lose content

2 Answers 111 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Romi Lungulescu
Top achievements
Rank 1
Romi Lungulescu asked on 13 Nov 2009, 07:09 PM

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:

                RadMultiPageApps.PageViews.Add(pageView);  
 
                RadTabStripApps.Tabs.Add(tab);  
                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?
thanks.

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 16 Nov 2009, 09:32 AM
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

Regards,
Paul
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.
1
RR
Top achievements
Rank 1
answered on 10 Sep 2020, 02:54 PM
no luck with the given sol.
Tags
TabStrip
Asked by
Romi Lungulescu
Top achievements
Rank 1
Answers by
Paul
Telerik team
RR
Top achievements
Rank 1
Share this question
or