locked
How to customize out of the box "Delete" button of the Ribbon for selected List Item in Office 365 RRS feed

  • Question

  • Hi,

    Kindly suggest me any solutions or reference links regarding how to customize out of the box "Delete" button for selected List Item.

    Thanks


    Razvi444


    • Edited by Razvi444 Monday, June 29, 2015 6:47 AM
    Monday, June 29, 2015 6:46 AM

All replies

  • I am not sure about your question. If this is something other than SharePoint default operations, we can do this easily using JavaScript. A custom script using JQuery first unbind the object then bind a new event with the Delete button. A sample script below...

    var delObj = $('<DELETE BUTTON SELECTOR');
    delObj.unbind();
    delObj.click(function(){ alert('test'); });

    Hope this helps.


    Anirban Bhattacharya

    • Proposed as answer by star.wars Tuesday, July 7, 2015 1:54 AM
    • Marked as answer by Patrick_Liang Wednesday, July 8, 2015 1:27 AM
    • Unmarked as answer by Razvi444 Thursday, July 23, 2015 2:14 PM
    Monday, June 29, 2015 6:54 AM
  • Hi,

    Can you provide more details about what kind of customization you want to apply to the “Delete Item” button in the ribbon?

    If you want to change the style of this button, you can apply custom CSS style into master page to make this button display in the way you want.

    Here is a demo about how to change the background color of the “Delete Item” button for your reference:

    About how to apply custom code into SharePoint page:

    http://techtrainingnotes.blogspot.com/2012/05/adding-javascript-and-css-to-sharepoint.html   

    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 star.wars Tuesday, July 7, 2015 1:55 AM
    • Marked as answer by Patrick_Liang Wednesday, July 8, 2015 1:27 AM
    • Unmarked as answer by Razvi444 Thursday, July 23, 2015 2:15 PM
    Tuesday, June 30, 2015 6:58 AM
  • Hi,

    I am trying to customize delete button which is available in ribbon when SharePoint List Item is selected and I tried with the given code

    var delObj = $('<DELETE BUTTON SELECTOR');
    delObj.unbind();
    delObj.click(function(){ alert('test'); });

    but alert is triggering after SharePoint default functionality. Let me know if any modifications need to be done in my code.

    Thanks


    Razvi444


    • Edited by Razvi444 Thursday, July 23, 2015 10:08 AM
    Thursday, July 23, 2015 9:48 AM
  • Hi,

    I want to place custom functionality in place of existing default delete button which is available in ribbon when List Item is selected using JQuery or JavaScript.

    Thanks


    Razvi444

    Thursday, July 23, 2015 9:56 AM
  • delObj.click(function(){ alert('test'); return false;});

    Using "return false" usually stops the post back of a submit button. Can you please try the code above?


    Anirban Bhattacharya

    Sunday, July 26, 2015 6:59 PM