I use RadUpload in the EditForm template in the RadGrid.
My question is: How to disable AJAX when the user clicks "Insert" or "Update" button?
The Javascript codes I used doesn't work:
var theRegexp = new RegExp("\.UpdateButton$|\.PerformInsertButton$","ig"); |
if (sender.EventTarget.match(theRegexp)) |
{ |
sender.EnableAjax = false; |
} |
Please look at the codes for RadUpload and buttons in EditForm at below
<EditFormSettings EditFormType="Template"> |
<FormTemplate> |
<table> |
<tr> |
<td>File:</td> |
<td> |
<telerik:RadUpload ID="RadUpload1" Skin="Vista" runat="server" InitialFileInputsCount="1" MaxFileInputsCount="1" ControlObjectsVisibility="None" MaxFileSize="1000000" AllowedFileExtensions=".pdf" TargetPhysicalFolder="<%$ appSettings:UploadPath %>" /> |
</td> |
</tr> |
<tr> |
<td> |
<asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button> |
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> |
</td> |
<td></td> |
</tr> |
</table> |
</FormTemplate> |
</EditFormSettings> |
Thanks,Jason