I have a toolbar in a user control which is ajaxified using the following declaration:
When certain toolbar buttons are clicked, controls are updated within a panel control (pnlFFV), and sometimes the toolbar itself is updated. This all works well, however, there is a button in the toolbar, which I want to cause a postback instead of an ajax update (this button is used to download a file and it is necessay to use the reponse object). I tried the following:
I added this script:
and in codebehind, I tried to wire it up to the particular toolbar button
However, this button still causes an ajax update. can someone help me figure out how to exclude a particular toolbar button from an ajaxupdate if the rest of the toolbar is ajaxified?
P.S., I also tried modifying the javascript to reference the AjaxManager instead of the Proxy, like so:
But this dind't seem to make a difference.
| <telerik:RadAjaxManagerProxy ID="rap1" runat="server" > |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="rtbActions"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="pnlFFV" LoadingPanelID="lpFFV" /> |
| <telerik:AjaxUpdatedControl ControlID="rtbActions" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManagerProxy> |
When certain toolbar buttons are clicked, controls are updated within a panel control (pnlFFV), and sometimes the toolbar itself is updated. This all works well, however, there is a button in the toolbar, which I want to cause a postback instead of an ajax update (this button is used to download a file and it is necessay to use the reponse object). I tried the following:
I added this script:
| function realPostBack_FFV(eventTarget, eventArgument) { |
| $find("<%= rap1.ClientID %>").__doPostBack(eventTarget, eventArgument); |
| } |
and in codebehind, I tried to wire it up to the particular toolbar button
| For Each itm As RadToolBarButton In rtbActions.Items |
| If itm.Value = "Download" Then |
| itm.Attributes.Add("onclick", String.Format("realPostBack_FFV('{0}', ''); return false;", itm.UniqueID)) |
| End If |
| Next |
However, this button still causes an ajax update. can someone help me figure out how to exclude a particular toolbar button from an ajaxupdate if the rest of the toolbar is ajaxified?
P.S., I also tried modifying the javascript to reference the AjaxManager instead of the Proxy, like so:
| function realPostBack_FFV(eventTarget, eventArgument) { |
| $find("<%= Me.MyAjaxManager.ClientID %>").__doPostBack(eventTarget, eventArgument); |
| } |
| //Me.MyAjaxManager gets a reference to the shared AjaxManager in my base page class |
But this dind't seem to make a difference.