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

Question about RadMultiPage

14 Answers 334 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 29 Jul 2010, 04:02 PM
Why is it that the whole RadMultiPage control has to be updated on postbacks? This seems horribly inefficient to me and such a waste of resources. Why is it that a single PageView within a RadMultiPage can't be set as an updated control within a RadAjaxManager? The only way it works is if I set the entire RadMultiPage as an updated control in my RadAjaxManager settings. This seems like such a waste. I have several PageViews which contain RadComboBox controls and those RadComboBox controls contain hundreds of items each. I'd like to load them from the database once up-front and have them just persist in ViewState on the client so that the Google Suggest-like filtering (i.e. MarkFirstMatch=true) will work super fast since it's all on the client. But, since you have the whole RadMultiPage control going back and forth the wire every single time there is an AJAX postback, the postbacks are very bloated. This means that I am basically being forced into using the server-side load-on-demand mechanism and doing a database pull each and every time the user starts to type in the comboboxes and return only the relevant results to the combobox. I'm OK with this, but I'd rather load the comboboxes once up-front and only have single PageViews updated when postbacks/callbacks occur. Please explain why this is so and what all my options are. Thank you. BTW, I do love your products...I'm just frustrated by this one limitation. It just looks what you are doing is applying class="rmpHiddenView" to hide the pageviews that are not currently being viewed.

14 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 03 Aug 2010, 02:31 PM
Hello Dave,

To implement the desired functionality, I recommend that you use the approach from the Load on Demand RadPageView demo.

I hope this helps.

Sincerely yours,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dave
Top achievements
Rank 1
answered on 19 Aug 2010, 11:13 PM
I implemented this using the Load on Demand RadPageView mechanism, but the problem is that after the pageviews are loaded, all the content/server controls inside those pageviews is persisted in ViewState and ends up getting passed back and forth on any partial postbacks that occur within any of the pageviews. I have a default.aspx page which contains a RadTabStrip and RadMultiPage. When the user clicks on a tab, the appropriate usercontrol is loaded into a pageview. The default.aspx page contains a RadAjaxManager which takes care of updating the multipage. I tried putting a RadAjaxManagerProxy in one of my usercontrols to see if I could limit the amount of data going back and forth, but it seems like the ENTIRE multipage is being sent. What are my options? The Load on Demand RadPageView mechanism doesn't seem to be saving me as much I thought it might since the fact that once the pageviews get loaded, they are still being included in viewstate and bloating my pages.
0
Mira
Telerik team
answered on 20 Aug 2010, 03:45 PM
Hello Dave,

To implement the desired functionality, please set the RenderSelectedPageOnly property of the RadMultiPage and AutoPostBack property of the RadTabStrip to true.

I hope this helps.

Sincerely yours,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chen
Top achievements
Rank 1
answered on 25 Oct 2010, 06:19 PM
Hi Mira,

I understand that RenderSelectedPageOnly will save traffic for obvious reasons.

Not knowing exactly what happens behind the scenes, I wonder if using a different strategy might work better:
  • Use Panel objects as holders for what each tab needs to display.
  • Use some mechanism to load the content of each tab/panel on demand
  • Use RadAjaxManager to selectiverly update controls within the panels

Would that be more efficient (traffic-wise)than using RenderSelectedPagesOnly?
Is the benefit in traffic significant enough to worth the added complexity? (in my scenario one tab has master/details RadGrids, another has FormView, and a couple other have multiple RadTextBoxes and Buttons).

Thanks!
0
Mira
Telerik team
answered on 26 Oct 2010, 04:11 PM
Hello Chen,

The RenderSelectedPageOnly property indicates whether to render only the currently selected RadMultiPage, so setting it to true will have the same effect as wrapping the contents of all multi-pages in panels and switching their visibility on selection.

I hope this helps.

Sincerely yours,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chen
Top achievements
Rank 1
answered on 26 Oct 2010, 04:46 PM
Thanks for the prompt response!

I was not clear enough, though.

If I use Panels, (I think that) I can use the RadAjaxManager to update specific objects in the Panel - as opposed to updating the whole RadPageView.
If I have enough controls on the PageView that can be of importance.

Also, using Panels I might be able to avoid the tab control PostBack using some fancy javascript (again - not certain about that).

0
Dave
Top achievements
Rank 1
answered on 26 Oct 2010, 05:04 PM
Chen,

I had that same thought (using Panels instead of the RadMultiPage), but in the end I decided to just use the RadMultiPage and limit the amount of data being sent back and forth by utilizing the Load on Demand mechanism - for the tabstrip and other server controls. The following JavaScript code can be used to prevent a postback if the content of a particular pageview has already been loaded:

if (args.get_tab().get_pageView())
{
      args.get_tab().set_postBack(false);
}

Put the following attribute in your RadTabStrip declaration:
OnClientTabSelecting="onTabSelecting"

Put the above JavaScript code inside the "function onTabSelecting(sender, args)" function.
0
Mira
Telerik team
answered on 28 Oct 2010, 12:46 PM
Hello,

You can see a demo implementing the Dave's approach here.

I hope it helps.

Best wishes,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 31 Mar 2011, 12:15 PM
Picking up on this, I've noticed that it now seems possible to expand the RadMultiPage in Configure Ajax Manager and see each PageView, but when trying to select something like one PageView "speaking to itself", or have the RadMultiPage just update a few of the PageViews, we will always get an RadPageViewCollection must contain RadPageView objects.

Is this a bug or are we doing something wrong? Is this a new features, ie being able to select PageViews, I dont remember having seen it before?
0
Mira
Telerik team
answered on 04 Apr 2011, 11:20 AM
Hello Patrik,

The RadPageViews appear in the RadAjaxManager designer because they are container controls, just like the asp:Panel.
However, setting them as AJAX initiators/updated controls is wrong, because it wraps them in additional divs and the RadMultiPage cannot locate them.

The recommended approach is to ajaxify the tabstrip and the multipage in the following way:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

I hope this helps.

Regards,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 04 Apr 2011, 11:23 AM
Hi Mira,

Please have a look at some messages back in this thread and you will notice that the discussion is really about the waste of resources and performance when you have to update an entire RadMultiPage and all its views, when you might infact only want to update one of them. If I am not misstaken, the code you posted will do just that, update the entire RadMultiPage, which is what we have today already.
0
Mira
Telerik team
answered on 06 Apr 2011, 12:51 PM
Hello Patrik,

Let me summarize:
There are some specifics when ajaxifying the RadTabStrip and the RadMultiPage. You can either ajaxify only the controls that are in the same pageview, or ajaxify the whole tabstrip and multipage:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

Mixing these two approaches is not supported.

Kind regards,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lynne
Top achievements
Rank 1
answered on 10 Apr 2013, 12:44 PM
I want to create page views dynamically so the load on demand feature is very helpful.  However on these pages are controls such as textboxes and combo boxes which users will use to enter data.  Is there a way to save this data after creating a PageView dynamically?  How would that be done?  Thanks!

0
Keith
Top achievements
Rank 2
answered on 12 Apr 2013, 05:51 PM
The way this is implemented is counter-productive. The only reason why I might use a tabcontrol is because the number of controls that I need to display need to be segregated and acted upon independently.

Why should the entire pageview be required to be updated when the only control I need to update is a single combobox on the page (one of a half dozen or more I might add).
 
When developing complex user interfaces, it is imperitive that only the specified data is updated in a specific control. This is the way cascading data works in pages where you have values in one control dependent upon the value in a previously edited control. As it is right now, I can't even update a combobox without updating the whole page. I may as well do an autopostback and render the whole page. It would certainly make my life much easier. The only problem is that considering the amount of data I am using, that would be impossible.

I suppose I have to write javascript to run clientside and update it that way until there is some kind of resolution.
Tags
Ajax
Asked by
Dave
Top achievements
Rank 1
Answers by
Mira
Telerik team
Dave
Top achievements
Rank 1
Chen
Top achievements
Rank 1
improwise
Top achievements
Rank 1
Iron
Iron
Lynne
Top achievements
Rank 1
Keith
Top achievements
Rank 2
Share this question
or