How to Disable Quick Edit in SharePoint?

Requirement:  Disable quick edit in SharePoint 2016 list.

How to disable quick edit in sharepoint 2013 or SharePoint 2016?
Bit background: We've a project tracking list with field "Project Health" which is updated by an event receiver based on certain parameters and business logic. So, we made the field hidden in SharePoint online using: SharePoint Online: How to Hide a Column from NewForm/EditForm?

Now the problem is: users can go to "Quick Edit" mode of the list and they get hidden field there! Although the column was hidden from Edit and New Forms, SharePoint quick edit (which replaced Datasheet view in previous versions of SharePoint) still displays the hidden field and we decided to disable quick edit mode for the SharePoint list.

SharePoint how to disable quick edit:
To disable quick edit mode in SharePoint 2013/2016 or in SharePoint online,
  • Go to the list settings >> Click on "Advanced settings" link
  • In Advanced Settings link, Scroll down and Under "Quick property editing " option, choose "No" for "Allow items in this list to be edited using Quick Edit?" and then click OK.
    sharepoint 2013 disable quick edit powershell
  • This disables quick edit in SharePoint list.

Disable quick edit using PowerShell
Here is how we can disable quick edit sharepoint 2013 programmatically with PowerShell.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue


#Get Web and List objects
$Web = Get-SPWeb $WebURL
$List = $Web.Lists.TryGetList($ListName)


CSOM to disable quick edit in SharePoint online: Unfortunately, this property is not exposed in SharePoint CSOM. So, you can't disable quick edit using CSOM. As a workaround you can hide the quick edit button with CSS (or create a list, disable quick edit using above UI method, save the list as template, and then create a new list instance from the template).
how to disable quick edit in sharepoint 2013

CSS to disable quick edit in SharePoint Online  
Alternatively, you can hide Quick Edit button in the ribbon with CSS also. Here is the CSS to hide sharepoint quick edit:
#Ribbon\.List\.ViewFormat\.Datasheet-Large {
Click on Settings Gear >> Edit Page >> Click on "Add Web Part " link and then Add script editor web part. Edit snippet and Place this CSS code in it, Stop Editing to save your changes. For Libraries, use: #Ribbon\.Library\.ViewFormat\.Datasheet-Large
How to Disable Quick Edit in SharePoint? How to Disable Quick Edit in SharePoint? Reviewed by Salaudeen Rajack on January 30, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.