FileUploaded Event not Firing

3 posts, 0 answers
  1. Mike
    Mike avatar
    41 posts
    Member since:
    Aug 2011

    Posted 13 May 2013 Link to this post

    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. Mike
    Mike avatar
    41 posts
    Member since:
    Aug 2011

    Posted 13 May 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 16 May 2013 Link to this post

    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.
Back to Top