Adding RadMultiPage dynamically on page load.

2 posts, 0 answers
  1. Susheel
    Susheel avatar
    8 posts
    Member since:
    Dec 2014

    Posted 09 Jul 2015 Link to this post


    I have RadTabStrip and RadMultiPage and i am adding some new Tabs and RadPageViews on Page load. Here is my code

                             RadTab objChildTab = new RadTab();
                            objChildTab.Text = "Tab1";
                            objChildTab.Value = "BAC";
                            objChildTab.PageViewID = "Page1";

            Note :  Here i am able to add Tabs to objRadTabStrip.

                            RadPageView pageView = new RadPageView();
                            pageView.ID = "Page1";
                            pageView.Height = 500;


          But Here i getting error :  

                                              The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases


     Kindly help me to identify that RadTabStrip is allowing me to add new Tabs but RadMultiPage  is not allowing me to add new RadPageViews.




  2. Ivan Danchev
    Ivan Danchev avatar
    1630 posts

    Posted 14 Jul 2015 Link to this post

    Hello Susheel,

    This is the right way of adding RadTabs and RadPageViews to the RadTabStrip and RadMultiPage dynamically. At my end using your code they were added and their properties were set correctly as shown in the following screenshot.

    Are you adding other controls in the Page_Load handler?

    Ivan Danchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top