Forum Discussion

Pavel2235's avatar
Pavel2235
Brass Contributor
Nov 20, 2023

Grid view broken

Hi!
I have a list in Sharepoint online. 
When I want to edit the items in a grid view, i can't see all of my items. 

In console I see the next message:
SPGrid FailToInitGanttControl: TypeError: Cannot read properties of null (reading 'display')

Could you help me what the problem is it?

1 Reply

  • Pavel2235's avatar
    Pavel2235
    Brass Contributor

    I noticed, that one of my user doesn't have Work phone number in the field Work Mobile Number.

    This field has a Person or Group type and show field as Work phone.

    Additionally, I have added JSON formatting to this column.

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "div",
      "style": {
        "box-sizing": "border-box",
        "padding": "0 2px",
        "overflow": "hidden",
        "text-overflow": "ellipsis"
      },
      "attributes": {
        "class": "sp-css-backgroundColor-BgMintGreen sp-css-borderColor-MintGreenFont sp-css-color-MintGreenFont sp-field-bold"
      },
      "txtContent": "[$Work_x0020_Mobile_x0020_Number.title]",
      "defaultHoverField": "[$Work_x0020_Mobile_x0020_Number]"
    }

    I tried to remove JSON from this column and it worked.
    It’s strange why if there is no data in this field, JSON breaks it.

Resources