Suppose you have a dialog with several buttons and other controls that initiate an AJAX request. There is one element in the dialog that might need to be updated by any AJAX request, Do I have to specify this element as the target for each initiator? Or is there some way for saying "whatever AJAX request is done, this element needs to be updated in any case"?
In this case the element in question is some area containing an error message. Most of the time it is hidden, but if any exception is thrown on some AJAX request, the code must make the element visible and fill it with the error message.
Michael G. Schneider
In this case the element in question is some area containing an error message. Most of the time it is hidden, but if any exception is thrown on some AJAX request, the code must make the element visible and fill it with the error message.
Michael G. Schneider
5 Answers, 1 is accepted
0
Accepted
Cori
Top achievements
Rank 2
answered on 13 May 2011, 01:37 PM
Hello mgs,
Any control that is updated as a result of an ajax request needs to be added to the UpdatedControls collection of any AjaxSetting or it will not get updated when the ajax request occurs. So yes, you need to set that control to as a target for each initiator.
I hope that helps.
Any control that is updated as a result of an ajax request needs to be added to the UpdatedControls collection of any AjaxSetting or it will not get updated when the ajax request occurs. So yes, you need to set that control to as a target for each initiator.
I hope that helps.
0
mgs
Top achievements
Rank 1
answered on 13 May 2011, 03:03 PM
Hello Cori,
thanks a lot for the answer. I do not know whether this would be a suggestion for Telerik or for Microsoft: I appreciated if an element could be marked as "always update, no matter which initiator".
Michael G. Schneider
thanks a lot for the answer. I do not know whether this would be a suggestion for Telerik or for Microsoft: I appreciated if an element could be marked as "always update, no matter which initiator".
Michael G. Schneider
0
mgs
Top achievements
Rank 1
answered on 14 May 2011, 10:34 AM
Suppose there are several controls that should be updated with an AJAX request. If these are wrapped by some "div" as in...
<div id="wrapper" runat="server">
<telerik:RadTextBox ID="lastname" runat="server" />
<telerik:RadTextBox ID="firstname" runat="server" />
<telerik:RadTextBox ID="city" runat="server" />
</div>
...will it be sufficient to specify the wrapper as the target for the AJAX request?
I tried, and I think that setting "telerik:AjaxUpdatedControl" descends down the control tree. However, I did not find it being mentioned in the documentation.
Michael G. Schneider
<div id="wrapper" runat="server">
<telerik:RadTextBox ID="lastname" runat="server" />
<telerik:RadTextBox ID="firstname" runat="server" />
<telerik:RadTextBox ID="city" runat="server" />
</div>
...will it be sufficient to specify the wrapper as the target for the AJAX request?
I tried, and I think that setting "telerik:AjaxUpdatedControl" descends down the control tree. However, I did not find it being mentioned in the documentation.
Michael G. Schneider
0
Hello,
Possible approach in this case is to wrap the control that needs to be always updated ion a regular asp Panel. The asp Panel is kind of a control which if once added to the RadAjax settings will be updated on each Ajax Request no matter of the initiator.
All the best,
Maria Ilieva
the Telerik team
Possible approach in this case is to wrap the control that needs to be always updated ion a regular asp Panel. The asp Panel is kind of a control which if once added to the RadAjax settings will be updated on each Ajax Request no matter of the initiator.
All the best,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
mgs
Top achievements
Rank 1
answered on 18 May 2011, 01:36 PM
Thanks a lot for this suggestion. I will try it.
Michael G. Schneider
Michael G. Schneider