filemanager: Drag and drop validation

1 Answer 63 Views
FileManager
ashutosh
Top achievements
Rank 1
Iron
Veteran
ashutosh asked on 27 Jun 2022, 07:04 AM

Hi Team,

I would like to fire a validation post drag but pre-drop, this should allow me to cancel the drop and show a message to enduser explaining the cause.

the drop event only allows to modify the rendered alert dialog but it doesnt allow me to cancel the event altogether. 

any help is appriciated.

Regards,

Ashutosh

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 29 Jun 2022, 10:46 AM

Hello Ashutosh,

As far as I understand from the provided information you need to cancel dropping a file based on a specific condition. If this is the case, you could prevent the dropping as demonstrated below: 

drop: function(e){             
              if(e.target == 'Documents'){               
                e.preventDefault()
              }
 },

Here is a Dojo example where the above is demonstrated. 

In case this is not the exact issue, please provide a little bit more details about the exact requirements, so I could understand the issue better and advise you further.

Regards,
Neli
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/.

Tags
FileManager
Asked by
ashutosh
Top achievements
Rank 1
Iron
Veteran
Answers by
Neli
Telerik team
Share this question
or