Conditional update panels in RadAjaxManager

5 posts, 0 answers
  1. Neil
    Neil avatar
    34 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2010 Link to this post

    Let's say I'm using a RadMenu with twenty items in it. Each item has a command. And, for simplicity, let's say that each command will update some part of the page by loading a web user control that's tied to the specific command raised. So I set up a radajaxmanager and have as my setting the menu and then in the updated controls group each user control. Everything works as you'd expect except in one respect. I'm seeing that all of the updated controls are refreshed when the menu triggers a partial postback. And given what I see in AjaxManager this is the way it's supposed to be.

    What I'd like to know is if there is a way that you can say, in simple terms, if it's command ABC then only update Panel1 from the UpdatedControls collection? Right now if it's any command Controls 1-20 (for example) are always updated. I thought about trying to control it with javascript but I haven't run across anything saying how to cancel a partial update for controls I don't want updated but allow it for controls I do want (and to change it dynamically based upon the values of a radmenu, for example).


  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 27 Sep 2010 Link to this post

    Hello Neil,

    This one of those things that UpdatePanel can do, but the RadAjaxManager or RadAjaxPanel cannot do, which is something I don't understand. If the UpdatePanel has conditional updates based on command name, why can't the RadAjaxManager or RadAjaxPanel do the same?

    I think this is a feature they should implement in RadAjaxManager/RadAjaxPanel.
  3. Neil
    Neil avatar
    34 posts
    Member since:
    Sep 2012

    Posted 27 Sep 2010 Link to this post

    I'm glad I wasn't missing something then. I have been trying to avoid using UpdatePanels on this particular page (it's a bit more complicated than what I described but essentially similar).
  4. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 30 Sep 2010 Link to this post

    Hi Neil,

    The desired scenario is not supported with RadAjax. However there is a workaround which could be used and it is illustrated in the attached sample. You can use this solution as far as the controls you want to update are controls that can perform postback themselves, for instance LinkButton, RadGrid, RadTreeView, etc.. And this will not work for Panel controls and web user controls.

    All the best,
    Iana
    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
  5. Neil
    Neil avatar
    34 posts
    Member since:
    Sep 2012

    Posted 30 Sep 2010 Link to this post

    Thank you. I'll take a look at the sample. In my case I'm using a lot of panels and user controls but there are other pages where I'm not and this may come in handy.
Back to Top