Answered How to hide "Edit Item" in a sharepoint list context menu(ECB) ?

  • jueves, 10 de mayo de 2012 5:35
     
     

    How to hide "Edit Item" in a sharepoint list context menu(ECB) ?

    i want ot use content editor webpart to write scripting

Todas las respuestas

  • jueves, 10 de mayo de 2012 11:41
     
     Respondida

    Hi Aneesh,

    use the following script to hide the Edit Item in ECB.

    $(document).ready(function(){
     $('.ms-MenuUIPopupBody').live('mouseover', function() {         
               $('#ID_EditItem').remove();
             }); 

        });

    by

    Vadivelu B

  • viernes, 11 de mayo de 2012 3:48
     
     

    hi anna,

    i have added in content editor like this

    <script type="text/javascript">

    $(document).ready(function(){
     $('.ms-MenuUIPopupBody').live('mouseover', function() {         
               $('#ID_EditItem').remove();
             }); 

        });

    </script>

    But still the edit item is not hiding...

    anything else to be added with this?

    I am very poor in coding

    pls help.

    thank you for your most valuable help...

  • viernes, 11 de mayo de 2012 5:30
     
     Respondida
    Hi i modified the code like this and now its working...

    <script language="javascript" type="text/javascript">
    $(document).ready(function(){
     $('.ms-MenuUIItemTableHover').live('mouseover',function() {        
    $("tr[text='Edit Item']").remove();

             });

        });

    </script>

    But i would like to remove the edit item row on load itself and not on mouseover

  • viernes, 11 de mayo de 2012 5:51
     
      Tiene código

    Hi Aneesh,

    did you referenced to jQuery Library? Because this is often the reason why the custom code did not work. You can reference to the newest jQuery Library like this:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
    <script type="text/javascript">
    //your code
    </script>

    I hope it helps


    Falco - http://www.msscorner.de

  • viernes, 11 de mayo de 2012 6:03
     
     

    Thanks for your reply...
    I have given the reference before the starting of javascript..

    Now with the above mentioned coding the edit item is appearing on clicking the ECB menu, on mouseover, it disappears... i want to make it disappear on load itself.

  • sábado, 12 de mayo de 2012 16:18
     
     

    If you don't give users permission to edit items in the list, that option will automatically be hidden for you from the context menu.

    If for whatever reason you need remove the "Edit Item" from context menu while keeping their edit permission, here's an alternative suggestion. Use SharePoint designer to create a data view of that list. You have full control of how list will look like.



    Pman
    http://www.pmansLab.com/


    • Editado Parvez Akkas sábado, 12 de mayo de 2012 16:21 Added some more info
    •  
  • lunes, 14 de mayo de 2012 5:45
     
     
    Can you give me the exact link ?
  • lunes, 14 de mayo de 2012 6:08
     
     

    hi

    Can you give me the exact link ?

    If you don't give users permission to edit items in the list, that option will automatically be hidden for you from the context menu.

    If for whatever reason you need remove the "Edit Item" from context menu while keeping their edit permission, here's an alternative suggestion. Use SharePoint designer to create a data view of that list. You have full control of how list will look like.



    Pman
    http://www.pmansLab.com/



  • martes, 15 de mayo de 2012 1:08
     
     

    exact link to what?


    Pman
    http://www.pmansLab.com/