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

Avoid pageload for usercontrols in RadTab

1 Answer 58 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Chinmay
Top achievements
Rank 1
Chinmay asked on 30 Aug 2009, 04:41 PM
Hi ,
My team is working with telerik controls . We are having licence also.We came across a scenario that is kind of show stoper for us now.

The application contains a radtabstrip with 8 tabs , all declaratively assigned in main.aspx page. Each tab is binded with usercontrols.
We have used Radajax manager to avoid post back whenever we click on any tab ( kind of updatepanel ).

Problem - When ever the main start page(Page having radtabstrip)  is loaded it's hitting all the usercontrols pageload which are binded to the other tabs & it makes the page nonresponsive for a while . Requirement is to load the tab contents when we click on the tab only . If we click on tab 2 then only 2nd tab's page load should hit it should not hit other tab's pageload. Can you please help us regarding the same so that it will help us solving the performance issue.

Let me know in case more details required.
In advance thank you.

Regards
Chinmay

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 31 Aug 2009, 08:52 AM
Hello Chinmay,

Having lots of page views (inside RadMultiPage) can slow down switching between tabs. Also it generates lots of HTML (because of the controls contained in the pageviews). To tackle this problem we have an online example demonstrating how to load pageviews on demand via AJAX.

The multipage also has a property “RenderSelectedPageOnly” which does exactly what it says. In this case switching to a new page view requires postback.

On aside note, 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

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.
Tags
Ajax
Asked by
Chinmay
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or