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

Duplicate Pageview ID on PageViewCreated in RadMultiPage

1 Answer 30 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thamim Ansari
Top achievements
Rank 1
Thamim Ansari asked on 22 Jan 2014, 01:00 PM
Hai friends,

   I am using RadMultiPage control for load the UserControl from Notes to  Documents tab, in this tab control i click to Notes tab i got that tab PageView ID, then i click the Quotes tab after that i got the Notes PageViewID then only i got the Quotes PageView ID it also goto the Page Load function.

  If i selected the other tab i got the first two tab PageView ID and goto Page Load, finally i got that selected PageView ID, for this reason the MultiPage tab taking long time to load, how to i solve this problem, please help me..

  I am using OnPageViewCreated Event to load the UserControl to this tabs.





1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 27 Jan 2014, 08:25 AM
Hello Thamim,

I would suggest you to implement the approach, demonstrated in our online demo here. In particular, please refer to the OnClientTabSelected. At the client-side event handler, you could verify if the tab, which is about to be selected has already an associated PageViewID. If an association already exist, you could cancel the PostBack. Thus you will overcome a duplication of the PageViews and omit the load of all previous UserControl, which will be re-loaded in the PageViewCreated event handler:

<script type="text/javascript">
function onTabSelecting(sender, args)
{
    if (args.get_tab().get_pageViewID())
    {
        args.get_tab().set_postBack(false);
    }
}
</script>



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
Data Access Free Edition
Asked by
Thamim Ansari
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or