Edit Row Height - SharePoint List

TourmenteT 30 Reputation points
2024-02-07T10:32:46.92+00:00

What JSON formatting can edit the height of SharePoint list's rows ? Thanks

Microsoft 365 and Office SharePoint For business Windows
{count} votes

Accepted answer
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2024-02-08T09:00:35.57+00:00

    According to the screenshot you provide, I guess there is a multi-line text column in the list. By default, the height of each row is decided by the height of each multi-line text column.

    If you want to reduce the row height and make the same row height, you could apply following JSON codes for the multi-line text column.

    Note: It will cause some lines in multi-line text column are not visible and only multi-line text with plain text can be applied JSON codes.

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "@currentField",
    "style": {
    "height": "50px",
    "align-items": "normal"
     }
    }
    

    And for the color of conditional formatting, the line "height": "50px" controls the height, change the parament as the same as multi-line text column.

    User's image

    Result:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,836 Reputation points Microsoft External Staff
    2024-02-08T03:06:02.0766667+00:00

    Here is an example for you:

    1.Click the column -> Column settings -> Format this column -> Advanced mode.

    2.Use following codes.

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "div",
    "txtContent": "@currentField",
    "style": {
    "height": "100px",
    "align-items": "normal"
     }
    }
    

    3.Result:

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.