Making an editable table row unselectable

Hi, all --

I am working on a mock-up with an editable table that is not hooked up to any database. I want to make one row unselectable while keeping the other rows able to be selected. Is there anything I can put in the expression to achieve this effect for UI purposes only?

Thanks. 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Jacquie Granger

    a!localVariables(
      local!selectedValue,
      
      local!data: {
        a!map(
          id: 1,
          name: "Mat",
          selectionDisabled: false
        ),
        a!map(
          id: 2,
          name: "Joe",
          selectionDisabled: true
        ),
        a!map(
          id: 3,
          name: "John",
          selectionDisabled: true
        )
      },
      a!gridLayout(
        label: "Editable Grid",
        labelPosition: "ABOVE",
        headerCells: {
          a!gridLayoutHeaderCell(label: "ID"),
          a!gridLayoutHeaderCell(label: "Name")
        },
        columnConfigs: {},
        rows: a!forEach(
          items: local!data,
          expression: a!gridRowLayout(
            selectionDisabled: fv!item.selectionDisabled,
            contents: {
            a!textField(
              value: fv!item.id,
              readOnly: true
            ),
            a!textField(
              value: fv!item.name,
              readOnly: true
            )
          }
          )
        ),
        selectable: true,
        shadeAlternateRows: true
      )
    )

Children
No Data