Back to view formats
View formattingSharePoint Online

Display Edit in Grid View Button in the Command Bar

In the Document Library, the [Edit in grid view] button is hidden under the [...] button. This sample demonstrates displaying the [Edit in grid view] button on the command bar.

Display Edit in Grid View Button in the Command Bar formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

View formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "commandBarProps": {
    "commands": [
      {
        "key": "editInGridView",
        "position": 2,
        "sectionType": "Primary"
      }
    ]
  }
}

From the contributor

How to use this sample

Summary

In the Document Library, the [Edit in grid view] button is hidden under the [...] button. This sample demonstrates displaying the [Edit in grid view] button on the command bar. By displaying the [Edit in grid view] button on the command bar, you can quickly open the grid view and edit the file property values.

screenshot of the sample

View requirements

This can be applied to any view.

Sample

Solution Author(s)
commandbar-display-edit-in-gridview.json Tetsuya Kawahara

Version history

Version Date Comments
1.0 January 23, 2024 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Additional notes

  • Command bar customization syntax reference

  • File property values can also be edited in ways other than grid view.

    screenshot of the details pane

    screenshot of the list form

    If you frequently edit file property values in grid view and want to edit them in grid view right from the command bar, try using this sample.