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

Working with RadMultiPage PageViewCreated on Postback

1 Answer 66 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 03 Dec 2013, 12:16 AM
Hi There,

The issue I am having is related to these next two threads but was never really answered.

http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/trying-to-understand-quot-pageviewcreated-quot-functionality.aspx

http://www.telerik.com/community/forums/aspnet-ajax/tabstrip/pageviewcreated-fires-before-tabclick.aspx

I completely understand that it is by design that the RadMultiPage PageViewCreated event fires (it seems) on every postback before Page_Load even occurs.

My problem is this:

I am building a sort of survey application that will have a dynamic number of pages (tabs)  that follows the wizard format in the Telerik online demos for the RadTabStrip. As a part of the page view creation for each page, I am loading a user control and doing an initialization routine where I dynamically load other user controls depending on the type of page that I am loading.

As a result, whenever I do a postback (e.g. a button click on a user control within a page that does a search) it takes a really long time to finish the request. I thought about doing some sort of conditional initialization of the controls to cut out some of the over head but I find the fact that PageViewCreated fires before everything else a bit difficult.

Also, if I don't fully intialise and load the controls (using LoadControl) on first page load, it seems the RadTabStrip and RadMultiPage lose state and the controls are no longer there.

Can anyone suggest an approach?

Thanks for any suggestions or input.

Kevin Parkinson

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 05 Dec 2013, 12:55 PM
Hello Kevin,

I am afraid that your observations are correct, and if you achieve a logic or condition, where you could omit loading any UserControl, the state of the controls nested in it would be lost at the postback on question, and the already filled data would be lost.

Regards,
Nencho
Telerik
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 the blog feed now.
Tags
TabStrip
Asked by
Kevin
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or