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

Setting e.sender.options.files?

1 Answer 33 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 2
Veteran
Iron
Grant asked on 07 Jan 2020, 06:24 AM

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

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 08 Jan 2020, 07:06 PM

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.
Tags
Upload
Asked by
Grant
Top achievements
Rank 2
Veteran
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or