Skip to main content
added 518 characters in body
Source Link
Ganesh Sanap - MVP
  • 47.4k
  • 22
  • 32
  • 64

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

Update from comments:

As you are using document library, you have to apply column formatting on Name column instead of Title column: :

Format option:

enter image description here

Then go to "Advanced mode":

enter image description here

Copy-paste above JSON and click "Save":

enter image description here

You can apply additional styling as per your requirements. Check below documentation for more information:

  1. Use Column formatting in SharePoint
  2. JSON formatting-syntax-reference

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

Update from comments:

As you are using document library, you have to apply column formatting on Name column instead of Title column: :

Format option:

enter image description here

Then go to "Advanced mode":

enter image description here

Copy-paste above JSON and click "Save":

enter image description here

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

Update from comments:

As you are using document library, you have to apply column formatting on Name column instead of Title column: :

Format option:

enter image description here

Then go to "Advanced mode":

enter image description here

Copy-paste above JSON and click "Save":

enter image description here

You can apply additional styling as per your requirements. Check below documentation for more information:

  1. Use Column formatting in SharePoint
  2. JSON formatting-syntax-reference
added 518 characters in body
Source Link
Ganesh Sanap - MVP
  • 47.4k
  • 22
  • 32
  • 64

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from listlist view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

Update from comments:

As you are using document library, you have to apply column formatting on Name column instead of Title column: :

Format option:

enter image description here

Then go to "Advanced mode":

enter image description here

Copy-paste above JSON and click "Save":

enter image description here

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

Update from comments:

As you are using document library, you have to apply column formatting on Name column instead of Title column: :

Format option:

enter image description here

Then go to "Advanced mode":

enter image description here

Copy-paste above JSON and click "Save":

enter image description here

added 518 characters in body
Source Link
Ganesh Sanap - MVP
  • 47.4k
  • 22
  • 32
  • 64

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 12 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 1 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

First of all, you cannot hide individual context menu options using JSON formatting. You can only customize/hide options from command bar at the top.

You can hide "Share" option from command bar using `` as key like:

{ "key": "share", "hide": true } 

Documentation: Command bar customization syntax reference


You can hide complete context menu from list view using two methods:

Method 1 - SharePoint OOTB:

In SharePoint list, Title column has three different variants:

  • Title
  • Title (linked to item)
  • Title (linked to item with edit menu)

So, you can use plain "Title" column in your list view to hide context menu.

Method 2 - JSON formatting:

You can add simple JSON formatting on Title column like below to hide context menu:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField" } 

While using JSON formatting, you will loose all OOTB functionality formatting for Title column including default click which open display/view form of list, you can get it back using JSON formatting on Title column like:

{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "sp-field-underline" } } 
Source Link
Ganesh Sanap - MVP
  • 47.4k
  • 22
  • 32
  • 64
Loading