Deferred Loading of each tab control

2 posts, 1 answers
  1. Scott
    Scott avatar
    35 posts
    Member since:
    Sep 2012

    Posted 05 Dec 2012 Link to this post

    Hopefully this is a simple question.  I have a page with a RadTabStrip with 8 RadTab pages.  When the page loads, it loads all 8 tab pages before display (a noticeable delay.)  I'd like to only load the pages when the corresponding tab is selected by the user the first time. Each tab has a user control, and each user control populates in it's corresponding Page_Load method.
    pseudo-code for the main page is:
    protected void Page_Init()
        foreach (usercontrol)
            Control thisUC = LoadControl(usercontrol);
            RadPageView thisPV = new RadPageView();   
            thisPV.ID = usercontrol.ToString()+"PageView";
            RadTab thisTab = new RadTab();
            thisTab.Text = usercontrol.ToString();
            thisTab.PageViewID = usercontrol.ToString()+"PageView";
  2. Answer
    Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 10 Dec 2012 Link to this post


    If you want to load only the content of the page-view associated with the currently selected item the RenderSelectedPageOnly property of the RadMutiPage should be set to true. It is important to note that in such case the RadTabStrip should perform post back upon tab switching.

    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top