Different ways to hide/disable quick edit in a list in SharePoint 2013/2016/Online

sharepoint list disable quick edit
SharePoint deveopment training course

In this SharePoint customization tutorial, we will discuss different ways to to hide or disable quick edit in a list in SharePoint 2013/2016/Online. I will show you, how to hide quick edit option in a list for a specific group or all users in SharePoint by using various different approaches.

Below are 3 different ways we can hide/disable quick edit SharePoint 2013/2016/Online.

  • Out of box feature
  • JavaScript client object model
  • CSS

SharePoint list disable edit using Out of box feature

First, we will see how wee can disable or hide SharePoint list quick edit using out of box feature.

The Quick Edit option not being turned on under “Advanced settings” option in List settings. The list has grouping enabled and this will disable the quick edit option.

You can find this option in below steps.

  1. Go to SharePoint list settings –> Advanced settings
  2. On Advanced settings, you will have an option as shown below. Make sure this is set to “No
disable quick edit sharepoint online
disable quick edit sharepoint online

After this users will not able to use quick edit in SharePoint list. This works well for SharePoint 2013/2016/Online.

Disable quick edit SharePoint 2013/2016/Online using JSOM (JavaScript object model)

You can hide the quick edit button for specific user in a group in SharePoint for different view. If you are new to JavaScript object model, read Working with JavaScript object model (jsom) in SharePoint 2013 or SharePoint Online.

<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            ExecuteOrDelayUntilScriptLoaded(getgroup, "sp.js");
        });

        function getgroup() {
            var clientContext = new SP.ClientContext.get_current();
            var currentUser = clientContext.get_web().get_currentUser();
            clientContext.load(currentUser);

            var allsitegroup = clientContext.get_web().get_siteGroups();
            var group = allsitegroup.getByName("The Specific Group Name");
            var groupusers = group.get_users();
            clientContext.load(groupusers);

            clientContext.executeQueryAsync(function () {
                var groupUserEnumerator = groupusers.getEnumerator();
                while (groupUserEnumerator.moveNext()) {
                    var groupUser = groupUserEnumerator.get_current();
                    if (groupUser.get_id() == currentUser.get_id()) {
                        $("#Hero-WPQ2 a:nth-child(2)").remove();
                        var tempHtml = $("#Hero-WPQ2").html();
                        tempHtml = tempHtml.replace('or  this list', '');
                        $("#Hero-WPQ2").html(tempHtml);
                    }
                }
            }, function () {
                console.log("error");
            });
        }
    </script>

Just add the above code in a script editor web part in SharePoint list view page.

SharePoint list disable quick edit using CSS

You can also write custom CSS inside script editor web part to hide Edit button in a list in SharePoint Online/2013/2016.

<STYLE>
.ms-heroCommandLink, .ms-heroCommandLink:visited {
    color: #0072c6;
    text-decoration: none;
    display: none;
}
</STYLE>
SharePoint list disable quick edit
SharePoint list disable quick edit

You can see in the above pic, the Edit this list is not appearing.

You may like following SharePoint list and document library tutorials:

Hope this SharePoint tutorial explains, how to disable/hide quick edit in list in SharePoint 2013/2016/Online.

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

About Rajkiran Swain

Rajkiran is currently working as a SharePoint Consultant in QATAR . Rajkiran having 6 + years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).

View all posts by Rajkiran Swain →