Is there a possible way to add rownum column in readonly grid?

Certified Associate Developer

Hello,

Is there a possible way to add rownum column in readonly grid?

If possible, it would be appreciated if you could attach an example for reference.

Thank you.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hey please find the attached code. You can use fv!identifier for the same.

     

    a!localVariables(
      local!data: {
        { a: 1, b: 2, c: 3 },
        { a: 4, b: 5, c: 6 },
        { a: 7, b: 8, c: 9 },
        { a: 10, b: 11, c: 12 },
        { a: 13, b: 14, c: 15 }
      },
      a!gridField(
        data: local!data,
        columns: {
          a!gridColumn(value: fv!identifier),
          a!gridColumn(label: "A", value: fv!row.a),
          a!gridColumn(label: "B", value: fv!row.a),
          a!gridColumn(label: "C", value: fv!row.a)
        }
      )
    )

Reply
  • 0
    Certified Lead Developer

    Hey please find the attached code. You can use fv!identifier for the same.

     

    a!localVariables(
      local!data: {
        { a: 1, b: 2, c: 3 },
        { a: 4, b: 5, c: 6 },
        { a: 7, b: 8, c: 9 },
        { a: 10, b: 11, c: 12 },
        { a: 13, b: 14, c: 15 }
      },
      a!gridField(
        data: local!data,
        columns: {
          a!gridColumn(value: fv!identifier),
          a!gridColumn(label: "A", value: fv!row.a),
          a!gridColumn(label: "B", value: fv!row.a),
          a!gridColumn(label: "C", value: fv!row.a)
        }
      )
    )

Children