3

In SharePoint we have default functionality that we can drag and drop documents in document library.

I want to disable drag and drop functionality. How can I do that?

I do not want to change in drag and drop's js that is reside in layout folder. Because it will effect on entire farm.

I want to change for specific site collection and only for document library.

user1337886
  • 516
  • 10
  • 23
  • https://sharepoint.stackexchange.com/questions/82805/how-can-i-disable-the-document-library-drag-and-drop-function – mbauer Feb 24 '14 at 13:08

3 Answers3

1

add this code in content editor web part:

<script>
    ExecuteOrDelayUntilScriptLoaded(function() {

             g_uploadType = DragDropMode.NOTSUPPORTED;
             SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
        }, "DragDrop.js");

</script>
Dikesh Gandhi
  • 6,803
  • 4
  • 30
  • 55
Waqas
  • 51
  • 6
0

For disable Drag and Drop functionality add below code in "Script Editor".

Go to Setting -> Edit Page -> Insert -> Web Part -> Media and Content -> Script Editor and refresh the library.

<script>
    ExecuteOrDelayUntilScriptLoaded(function() {
             g_uploadType = DragDropMode.NOTSUPPORTED;
             SPDragDropManager.DragDropMode = DragDropMode.NOTSUPPORTED;
        }, "DragDrop.js");
</script>

That definitely works, I have tried.

Robert Lindgren
  • 24,520
  • 12
  • 53
  • 79
Amar
  • 21
  • 3
0

I've also done the below to disable drag and drop:

  1. add content editor web part to page
  2. while Content Editor web part is selected, under "format text" in ribbon click edit source
  3. add html ​​<style> #ms-dnd-dropbox{ display: none !important; } </style>​​
aoe2
  • 174
  • 2
  • 2
  • 13