Disable drag and drop on List and Library

Hello there,

Is it possible to disable drag and drop on List and Library?
I have a piece of code that limits the user from uploading #files. But as i was testing, i see that the drag and drop functionality doesn't comply with my set rules.
I tried to do this with standard jquery but failed.

        $('.initTable').bind('drop', function(e) {
                    console.log('------------------');
                    e.preventDefault();
                    return false;
                });

Thanks for any suggestions.

Dear @asmita_adh,
Please, try the following JS code to prevent drag-n-drop functionality:

fd.spRendered(function(){
  var dt = fd.control('SPDataTable1');
  dt.ready().then(function() {
    dt._kendoUpload.disable();
  });
});

This uses a private variable _kendoUpload, so it might change a little in future versions at some point (or it might not), but it should work right now.

1 Like