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

Deferred Loading of each tab control

1 Answer 131 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 05 Dec 2012, 04:12 PM
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";
        thisPV.Controls.Add(thisUC);
        ...
        RadMultiPage1.PageViews.Add(thisPV);
        RadTab thisTab = new RadTab();
        thisTab.Text = usercontrol.ToString();
        thisTab.PageViewID = usercontrol.ToString()+"PageView";
        RadTabStrip1.Tabs.Add(thisTab);
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar Terziev
Telerik team
answered on 10 Dec 2012, 02:47 PM
Hello,

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.

Greetings,
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.
Tags
TabStrip
Asked by
Scott
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or