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

RenderSelectedPageOnly="true" but when the page load it calls all user controls

2 Answers 219 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
taeho
Top achievements
Rank 1
taeho asked on 03 Nov 2008, 02:11 AM
Hi there,

I have a page which has a RadTabStrip and a RadMultiPage.
The radMultiPage has 7 pageViews in which there is an usercontrol.
The problem I have is that even if I set RenderSelectedPageOnly="true" to the radMultiPage, the page loads all usercontrols.

<telerik:RadAjaxManager runat="server" ID="AjaxForUserInfo">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadTabStrip Width="700px" ID="RadTabStrip1" AutoPostBack="true" runat="server" CausesValidation="false" Skin="Sunset" MultiPageID="RadMultiPage1" SelectedIndex="0" Align="Justify" ReorderTabsOnSelect="false">
                                <Tabs>
                                    <telerik:RadTab Text="A">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="B">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="C">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="E">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="F">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="G">
                                    </telerik:RadTab>
                                    <telerik:RadTab Text="H">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" runat="server" RenderSelectedPageOnly="true" SelectedIndex="0" CssClass="pageView" Width="700px">
                                <telerik:RadPageView ID="RadPageView1" runat="server">
                                    <uc1:A runat="server" ID="A" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView2" runat="server">
                                    <uc3:B runat="server" ID="B" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView3" runat="server">
                                    <uc2:C runat="server" ID="C" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView7" runat="server">
                                    <uc7:D runat="server" ID="D" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView6" runat="server">
                                    <uc6:E runat="server" ID="E" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView4" runat="server">
                                    <uc4:F runat="server" ID="F" />
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView5" runat="server">
                                    <uc5:G runat="server" ID="G" />
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>

Your help would be appreciated,

Thanks,

Toby


2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 03 Nov 2008, 07:56 AM
Hi taeho,

RadTabstrip always reloads all of its pageviews. The RenderSelectedPageOnly property does just that - it renders only the selected page view; the code-behind of your page / UserControls will be fired no matter which pageview is rendered. Loading all pageviews is essential for the server controls living in the page views. If we don't load them every time viewstate will be corrupted and postback events won't fire.

Greetings,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
JC
Top achievements
Rank 1
answered on 03 Nov 2008, 01:53 PM
Hi,

I have a similar problem. Is there a way I can mimic a tab that only re-loads and renders the current tab/pageview when an AJAX call occurs?

Regards,
JC
Tags
TabStrip
Asked by
taeho
Top achievements
Rank 1
Answers by
Paul
Telerik team
JC
Top achievements
Rank 1
Share this question
or