RadAsyncUpload - OnClientFileUploading

6 posts, 0 answers
  1. Joan
    Joan avatar
    7 posts
    Member since:
    Oct 2010

    Posted 04 May 2012 Link to this post

    Hi Telerik,

    is "set_cancel" method still supporting  OnClientFileUploading(http://www.telerik.com/help/aspnet-ajax/asyncupload-onclientfileuploading.html)?

    I tried to use args.set_cancel(true) but got a javascript exception - Microsoft JScript runtime error: Object doesn't support property or method 'set_cancel'

    Below is my code:

    Javascript:
    function OnClientFileUploading(sender, eventArgs) {

     

    //cancel the upload

    eventArgs.set_cancel(

     

    true);

    alert(

     

    'no duplicate file: ' + args.get_fileName());

     

    //hide the uploading item

    $telerik.$(eventArgs.get_row()).css(

     

    "display", "none");

    }


    HTML:

    <

     

     

    telerik:radasyncupload id="Radasyncupload1" runat="server"

     

    OnClientFileUploading="OnClientFileUploading"

     

    >

     

    </telerik:radasyncupload>


  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 May 2012 Link to this post

    Hi Joan,

    I tried the same scenario in the latest version(2012, 1, 411, 35) in which args.set_cancel method is supporting. Please upgrade to latest version.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joan
    Joan avatar
    7 posts
    Member since:
    Oct 2010

    Posted 07 May 2012 Link to this post

    Is it supported in 2011.1.509.35?
  5. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 09 May 2012 Link to this post

    Hello Joan,

    The set_cancel() function was introduced in version 2011.2.915 of the controls.
     
    All the best,
    Bozhidar
    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.
  6. Peter
    Peter avatar
    98 posts
    Member since:
    Mar 2012

    Posted 03 Mar 2015 Link to this post

    I'm getting this error in the latest 2014 build:

    function OnClientFileUploading(sender, args) {
                    //alert(args.get_fileName().length);                
                    args.set_cancel(!window.confirm('Are you sure?'));            
                }

    0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'set_cancel'
  7. Bozhidar
    Admin
    Bozhidar avatar
    1103 posts

    Posted 05 Mar 2015 Link to this post

    Hello,

    I tested the AsyncUpload and is seems to be working fine on my end. Here's the code I used:
    <script type="text/javascript">
        function onClientFileUploading(sender, args) {
            args.set_cancel(true);
        }
    </script>
    <div>
        <telerik:RadAsyncUpload runat="server"
            OnClientFileUploading="onClientFileUploading">
        </telerik:RadAsyncUpload>
    </div>

    Can you confirm that you are receiving the error with the same markup? If so, could you also specify the exact version of your controls, as well as the steps to reproduce (For instance what kind of file you are uploading. Also, is the issue reproduced in all browsers, or a specific one?

    Regards,
    Bozhidar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017