Skip to main content
New Participant
May 8, 2026
Question

Editable Grid

How to disable all the remaining checkboxes while we select one checkbox in Editable grid ?

    3 replies

    harshas2775
    Brainy
    May 8, 2026

    With this design if a user selects a checkbox and rest checkboxes are disabled, wont it be an inconvenience that user cannot select another checkbox?

    Happy to help. Even happier to optimize.
    mikes0011
    Brainy
    May 8, 2026

    presumably they would be forced to un-check the original checkbox.  the UX choice is debatable, but i will grant that there are some cases where it's potentially the best solution.

    The Expression Guru
    shubhama926776
    Brainy
    May 8, 2026

    Try this example

    a!localVariables(
      local!employees: {
        a!map(id: 1, name: "Ravi", role: "Developer"),
        a!map(id: 2, name: "Priya", role: "Tester"),
        a!map(id: 3, name: "Arun", role: "Manager")
      },
      local!selectedRow: {},
    
      a!gridLayout(
        label: "Select Only One Row",
        headerCells: {
          a!gridLayoutHeaderCell(label: "Name"),
          a!gridLayoutHeaderCell(label: "Role")
        },
        rows: a!forEach(
          items: local!employees,
          expression: a!gridRowLayout(
            id: fv!item.id,
            contents: {
              a!textField(
                value: fv!item.name,
                readOnly: true
              ),
              a!textField(
                value: fv!item.role,
                readOnly: true
              )
            },
            selectionDisabled: and(
              length(local!selectedRow) > 0,
              not(contains(local!selectedRow, fv!item.id))
            )
          )
        ),
        selectable: true,
        selectionValue: local!selectedRow,
        selectionSaveInto: a!save(local!selectedRow, a!flatten(save!value))
      )
    )

    शुभम्