Setting e.sender.options.files?

2 posts, 1 answers
  1. Grant
    Grant avatar
    167 posts
    Member since:
    Jul 2016

    Posted 07 Jan Link to this post

    Hi, 

    Im basing this question on the Upload Confirmation Dialog (https://docs.telerik.com/kendo-ui/knowledge-base/upload-confirmation-dialog). If the user selects 'Cancel' all the existing files are visually cleared. After this I would like to re-add (visually) any existing files.

    I've tried setting 'e.sender.options.files' to the initial file list, and while the widget data is updated, its not updated visually. See Dojo, https://dojo.telerik.com/odoDODUZ.

    Note: Your original demo doesnt actually work, the upload continues to fail, however I've tested the behavior in my local environment, and it is as I've described.

    Please advise, Thanks,
    Grant

     

  2. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    2104 posts

    Posted 08 Jan Link to this post

    Hi Grant,

    The files option of the Upload can be set only during initialization of the widget. Currently, there is no way to programmatically set new selected files (refresh the list of selected files) on the fly after the Upload has been initialized. This means that, if you want a different list of files to be displayed as selected, you need to initialize a new Upload and pass those new files to its files option.

    Regards,
    Ivan Danchev
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top