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

Conditional update panels in RadAjaxManager

4 Answers 257 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 27 Sep 2010, 06:41 PM
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).


4 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 27 Sep 2010, 08:49 PM
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.
0
Neil
Top achievements
Rank 1
answered on 27 Sep 2010, 08:52 PM
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).
0
Iana Tsolova
Telerik team
answered on 30 Sep 2010, 09:55 AM
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
0
Neil
Top achievements
Rank 1
answered on 30 Sep 2010, 12:52 PM
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.
Tags
Ajax
Asked by
Neil
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Neil
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or