how to delete a entire row in readOnly grid?

Certified Associate Developer

how to delete a entire row in readonly grid?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to krishnav9816

    Try running this code in an unnamed interface to understand how removing works. 

    a!localVariables(
      local!data: {
        { first: "Some", second: "Value" },
        { first: "Another", second: "Point" }
      },
      a!gridField(
        data: local!data,
        columns: {
          a!gridColumn(
            label: "First Column",
            value: fv!row.first
          ),
          a!gridColumn(
            label: "Second Column",
            value: fv!row.second
          ),
          a!gridColumn(
            value: a!richTextDisplayField(
              value: a!richTextIcon(
                icon: "times",
                link: a!dynamicLink(
                  value: remove(
                    local!data,
                    wherecontains(
                      fv!row,
                      cast(typeof({ a!map() }), local!data)
                    )
                  ),
                  saveInto: local!data
                )
              )
            )
          )
        }
      )
    )

Children