locked
How to hide delete icon in ribbon on List Item Selection RRS feed

  • Question

  • Hi,

    Kindly suggest me any solutions or reference links regarding how to hide delete icon in ribbon on List Item Selection using JQuery.

    Thanks


    Razvi444


    • Edited by Razvi444 Thursday, July 9, 2015 8:50 AM
    Thursday, July 9, 2015 8:50 AM

Answers

All replies

  • Razvi,

    You can use custom Permission Level with Delete permission removed and item-level or folder-level permissions, but this can cause you a lot of headache managing the broken inheritance of permissions.

    or you could write a event handler to prevent deletion of that item

    as you have asked using Jquery (not a best way of doing though )

    <script type="text/javascript">
            document.getElementById("Ribbon.Documents.Manage-LargeMedium-1-2").style.display = "none";
        </script>
    


    Sivabalan


    Thursday, July 9, 2015 5:34 PM
  • Hi,

    Per my understanding, you might want to show/hide the “Delete” button in the ribbon according to the item selection.

    Sivabalan has offered a code demo about hiding this button, about how to get the selected items in a list using JavaScript, the code snippets in the link below would be helpful:

    http://stackoverflow.com/questions/21701406/getting-sharepoint-selected-list-item-by-using-client-side-object-model-csom

    Thanks

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Dennis Guo Monday, July 20, 2015 1:37 AM
    • Marked as answer by Dennis Guo Tuesday, July 21, 2015 1:23 AM
    Friday, July 10, 2015 9:27 AM