Skip to content

Commit

Permalink
Merge pull request #610 from ganesh-sanap/spo-list-disable-quick-prop…
Browse files Browse the repository at this point in the history
…erty-editing

New Sample - Disable Quick property editing (Grid view) from SharePoint list
  • Loading branch information
pkbullock authored Oct 29, 2023
2 parents 25744f1 + 9263454 commit 8d165bc
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 0 deletions.
76 changes: 76 additions & 0 deletions scripts/spo-list-disable-quick-property-editing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
plugin: add-to-gallery
---

# Disable Quick property editing (Grid view) from SharePoint list

## Summary

This sample script will show you how to disable the Quick property editing (Grid view) from SharePoint list.

![Example Screenshot](assets/example.png)

# [PnP PowerShell](#tab/pnpps)

```powershell
# Display name of SharePoint online list or document library
$listName = "My SharePoint List"
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/pnppowershell)"
# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Disable Quick property editing (Grid view) from SharePoint list
Set-PnPList -Identity $listName -DisableGridEditing $true
Write-Host "Done! :-)" -ForegroundColor Green
# Disconnect SharePoint online connection
Disconnect-PnPOnline
```

[!INCLUDE [More about PnP PowerShell](../../docfx/includes/MORE-PNPPS.md)]

# [CLI for Microsoft 365](#tab/cli-m365-ps)

```powershell
# Display name of SharePoint online list or document library
$listName = "My SharePoint List"
# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/cliformicrosoft365)"
# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
m365 login
}
# Disable Quick property editing (Grid view) from SharePoint list
m365 spo list set --webUrl $siteUrl --title $listName --disableGridEditing true
Write-Host "Done! :-)" -ForegroundColor Green
# Disconnect SharePoint online connection
m365 logout
```

[!INCLUDE [More about CLI for Microsoft 365](../../docfx/includes/MORE-CLIM365.md)]

***

## Contributors

| Author(s) |
|-----------|
| [Ganesh Sanap](https://ganeshsanapblogs.wordpress.com/about) |


[!INCLUDE [DISCLAIMER](../../docfx/includes/DISCLAIMER.md)]
<img src="https://m365-visitor-stats.azurewebsites.net/script-samples/scripts/spo-list-disable-quick-property-editing" aria-hidden="true" />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions scripts/spo-list-disable-quick-property-editing/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"name": "spo-list-disable-quick-property-editing",
"source": "pnp",
"title": "Disable Quick property editing (Grid view) from SharePoint list",
"shortDescription": "This sample script will show you how to disable the Quick property editing (Grid view) from SharePoint list.",
"url": "https://pnp.github.io/script-samples/spo-list-disable-quick-property-editing/README.html",
"longDescription": [],
"creationDateTime": "2023-10-26",
"updateDateTime": "2023-10-26",
"products": [
"SharePoint"
],
"metadata": [
{
"key": "PNP-POWERSHELL",
"value": "2.2.0"
},
{
"key": "CLI-FOR-MICROSOFT365",
"value": "7.0.0"
}
],
"categories": [
"Configure"
],
"tags": [
"SharePoint Online",
"Connect-PnPOnline",
"Set-PnPList",
"Disconnect-PnPOnline",
"m365 status",
"m365 login",
"m365 spo list set",
"m365 logout"
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/script-samples/main/scripts/spo-list-disable-quick-property-editing/assets/preview.png",
"alt": "Image preview of the Quick property editing (Grid view) option in SharePoint list"
}
],
"authors": [
{
"gitHubAccount": "ganesh-sanap",
"company": "",
"pictureUrl": "https://avatars.githubusercontent.com/u/25476310?v=4",
"name": "Ganesh Sanap"
}
],
"references": [
{
"name": "Want to learn more about PnP PowerShell and the cmdlets",
"description": "Check out the PnP PowerShell site to get started and for the reference to the cmdlets.",
"url": "https://aka.ms/pnp/powershell"
},
{
"name": "Want to learn more about CLI for Microsoft 365 and the commands",
"description": "Check out the CLI for Microsoft 365 site to get started and for the reference to the commands.",
"url": "https://aka.ms/cli-m365"
}
]
}
]

0 comments on commit 8d165bc

Please sign in to comment.