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

FileUploaded Event not Firing

2 Answers 198 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
License
Top achievements
Rank 1
License asked on 13 May 2013, 03:48 PM
I am updated my project to utilize the RadAsynchUpload control and cannot get the FileUploaded event to fire. I am using the control in two places, one just a page with an upload button and the other inside of a RadGrid. Everything is working fine in the RadGrid. I am able to select the file and then click the update button, where it is firing off the FileUploaded event. For some reason, this is not working in the standalone sense. I can't seem to understand what I'm missing.

<telerik:RadAsyncUpload ID="radAsyncUpload" runat="server" EnableInlineProgress="true" MaxFileInputsCount="1" OnClientFileUploaded="onClientFileUploaded" OnClientFileUploadRemoved="onClientFileUploadRemoved" PostbackTriggers="radUpload" />
 
<telerik:RadButton ID="radUpload" runat="server" Text="Upload" Enabled="false" CausesValidation="false" />
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
      <script type="text/javascript">
          function onClientFileUploaded(sender, args) {
              var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(true);
          }
          function onClientFileUploadRemoved(sender, args) {
              var radUpload = $find("<%=radUpload.ClientID %>");
 
              radUpload.set_enabled(false);
          }
      </script>
 </telerik:RadScriptBlock>

2 Answers, 1 is accepted

Sort by
0
License
Top achievements
Rank 1
answered on 13 May 2013, 04:45 PM
Ok, I ended up bypassing this event and just using the RadButton click event. Still curious as to why this isn't working outside of the grid.
0
Plamen
Telerik team
answered on 16 May 2013, 12:51 PM
Hi Robert,

 
I have tested the sample code that you shared and it worked properly at my side. I am attaching my sample test web page. Please review it and let me know if you have further questions.

Regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
License
Top achievements
Rank 1
Answers by
License
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or