How to reset Kendo Upload via Javascript

4 posts, 0 answers
  1. Jim
    Jim avatar
    26 posts
    Member since:
    Mar 2016

    Posted 14 Jun 2016 Link to this post

    How can I reset a Kendo Upload control based upon a button click event?

     

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2211 posts

    Posted 15 Jun 2016 Link to this post

    Hello Jim,

    This functionality is currently being developed for the Upload widget. We will add several API methods which will allow the developer to reset the widget according to different conditions. At the moment, a possible workaround is to destroy the widget and recreate it again.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Jonathan
    Jonathan avatar
    7 posts
    Member since:
    May 2011

    Posted 21 Jun Link to this post

    Any word on a reset method? I'm still doing this:

                                $("#uxRelatedDocumentUploadDiv .k-upload-files").remove();
                                $("#uxRelatedDocumentUploadDiv .k-upload-status").remove();
                                $("#uxRelatedDocumentUploadDiv .k-upload.k-header").addClass("k-upload-empty");
                                $("#uxRelatedDocumentUploadDiv .k-upload-button").removeClass("k-state-focused");

  4. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2211 posts

    Posted 22 Jun Link to this post

    Hi Jonathan,

    Yes, you could use the clearAllFiles or removeAllFiles method to achieve the task.

    Regards,
    Dimiter Madjarov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top