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

Set dropZone after initialization

3 Answers 308 Views
Upload
This is a migrated thread and some comments may be shown as answers.
David Revivo
Top achievements
Rank 1
David Revivo asked on 12 Oct 2020, 05:53 PM

Hi,

Is it possible to set the dropZone dynamically?

 

 

3 Answers, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 14 Oct 2020, 09:13 AM

Hi David,

Here is an example of how the DropZone of the Upload component can be changed dynamically. In the beginning, the DropZone is marked by the green square and after that, we can change it to the red square. 

To implement the targeted functionality, the setOptions method is used.  When you click on the button above the Upload, the following code is executed.

      $("#changeDZ").click(function(){
        var upload = $("#files").data("kendoUpload");
        upload.setOptions({
          dropZone: ".redSquare"
        })
      })

I hope the above will help you implement the targeted functionality in your application. 

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
David Revivo
Top achievements
Rank 1
answered on 15 Oct 2020, 04:39 PM

I tried this and it didn't work, now I see that it doesn't work on my version (2019.3.1219).

Anyway, thank you Peter.

0
Petar
Telerik team
answered on 16 Oct 2020, 10:25 AM

You are welcome, David!

Let me know if you have additional questions related to the current thread. 

Regards,
Petar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Upload
Asked by
David Revivo
Top achievements
Rank 1
Answers by
Petar
Telerik team
David Revivo
Top achievements
Rank 1
Share this question
or