Best approach to display 4000 characters in a!GridField

I have a grid field containing comments, where 1 of the fields could hold upto 4000 characters.

When the length is 4000, then text display is not user friendly.

I tried using a!richtextimage to display the comments on hover over but icon display only upto 1000 length etc and rest shown as(sampletext...) trunc.

I do not want to use a different interface to display the comment alone from Grid.

Any suggestions?

a!gridField(
  data: ri!data,
  label: "Comments",
  labelPosition: "COLLAPSED",
  totalCount: ri!data.totalCount,
  columns: {
    a!gridColumn(
      label: "Comment Type",
      sortField: "commentType",
      value: fv!row.commentTypeId
    ),
    a!gridColumn(
      label: "Commented By",
      sortField: "createdBy",
      value: rule!ACO_replaceNull(
        fv!row.createdBy,
        fv!row.createdBy
      )
    ),
    a!gridColumn(
      label: "Commented On",
      sortField: "createdDt",
      value: rule!ACO_replaceNull(
        fv!row.createdDt,
        fv!row.createdBy
      )
    ),
    a!gridColumn(
      label: "Comment",
      sortField: "comment",
      value: a!richTextDisplayField(
        value: a!richTextItem(
          text: fv!row.commentValue
        )
      )
    ),
    a!gridColumn(
      label: "Comment",
      align: "CENTER",
      value: a!richTextDisplayField(
        value: a!richTextIcon(
          icon: "comments",
          caption: fv!row.commentValue
        )
      )
    ),
    a!gridColumn(
      label: "Comment",
      align: "CENTER",
      value: ""
      
    ),
    a!gridColumn(
      label: "User(s) Tagged",
      sortField: "tags",
      value: a!forEach(
        items: if(
          rule!ACO_isEmpty(
            fv!row.emailTags
          ),
          null,
          trim(
            split(
              fv!row.emailTags,
              ";"
            )
          )
        ),
        expression: concat(
          user(
            fv!item,
            "firstName"
          ),
          " ",
          user(
            fv!item,
            "lastName"
          )
        )
      )
    )
  },
  value: ri!pagingInfo,
  showWhen: ri!showWhen,
  pagingSaveInto: ri!pagingInfo
)

Parents
  • There are a variety of techniques, depending on the size of the text and the real-estate of the User interface:

    • you can display a subset of the text e.g. first 20 characters, with an ellipsis e.g. "This is the text to be displayed but there's more to see (...)", and make the ellipsis a dynamic link that will reveal the whole text when you click on it, but still in the same column
    • you could make the dynamic link show the full text in a separate component below the table where it probably will look better but you lose the immediacy/context of it in the row in the table
Reply
  • There are a variety of techniques, depending on the size of the text and the real-estate of the User interface:

    • you can display a subset of the text e.g. first 20 characters, with an ellipsis e.g. "This is the text to be displayed but there's more to see (...)", and make the ellipsis a dynamic link that will reveal the whole text when you click on it, but still in the same column
    • you could make the dynamic link show the full text in a separate component below the table where it probably will look better but you lose the immediacy/context of it in the row in the table
Children

 Discussion posts and replies are publicly visible