-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #610 from ganesh-sanap/spo-list-disable-quick-prop…
…erty-editing New Sample - Disable Quick property editing (Grid view) from SharePoint list
- Loading branch information
Showing
4 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
66
scripts/spo-list-disable-quick-property-editing/assets/sample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} | ||
] |