Question about RadMultiPage

15 posts, 0 answers
  1. Dave
    Dave avatar
    36 posts
    Member since:
    Jan 2008

    Posted 29 Jul 2010 Link to this post

    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.
  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 03 Aug 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dave
    Dave avatar
    36 posts
    Member since:
    Jan 2008

    Posted 19 Aug 2010 Link to this post

    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.
  5. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 20 Aug 2010 Link to this post

    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
  6. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 25 Oct 2010 Link to this post

    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!
  7. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 26 Oct 2010 Link to this post

    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
  8. Chen
    Chen avatar
    46 posts
    Member since:
    Oct 2010

    Posted 26 Oct 2010 Link to this post

    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).

  9. Dave
    Dave avatar
    36 posts
    Member since:
    Jan 2008

    Posted 26 Oct 2010 Link to this post

    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.
  10. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 28 Oct 2010 Link to this post

    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
  11. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 31 Mar 2011 Link to this post

    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?
  12. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 04 Apr 2011 Link to this post

    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
  13. Patrik Johansson
    Patrik Johansson avatar
    270 posts
    Member since:
    May 2010

    Posted 04 Apr 2011 Link to this post

    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.
  14. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 06 Apr 2011 Link to this post

    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
  15. Lynne
    Lynne avatar
    13 posts
    Member since:
    Apr 2008

    Posted 10 Apr 2013 Link to this post

    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!

  16. Keith
    Keith avatar
    94 posts
    Member since:
    Jun 2012

    Posted 12 Apr 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017