Editable Grid

Certified Lead Developer

Is there any way to remove select all checkbox in editable grid?
we have requirement to select 1 item at a time. there is grid validation of selecting 1 item at time.
it shows error but is there any way to not even allowing to check the select all checkbox?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You could also use an image field displaying a checkbox.

    load(
      local!data: {
        1,2,3
      },
      local!selectedIndex,
      a!gridLayout(
        label: "Editable Grid",
        labelPosition: "ABOVE",
        headerCells: {
          a!gridLayoutHeaderCell(label: ""),
          a!gridLayoutHeaderCell(label: "Data")
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(width: "ICON"),
          a!gridLayoutColumnConfig(width: "DISTRIBUTE")
        },
        rows: a!forEach(
          items: local!data,
          expression: a!gridRowLayout(
            contents: {
              a!imageField(
                images: a!documentImage(
                  document: if(
                    fv!index = tointeger(local!selectedIndex),
                    cons!CHECKBOX_CHECKED,
                    cons!CHECKBOX
                  ),
                  link: a!dynamicLink(
                    saveInto: if(
                      tointeger(local!selectedIndex) = fv!index,
                      a!save(
                        target: local!selectedIndex,
                        value: null
                      ),
                      a!save(
                        target: local!selectedIndex,
                        value: fv!index
                      )
                    )
                  )
                )  
              ),
              a!textField(
                value: fv!item
              )
            }
          )
        )
      )
    )

  • 0
    Certified Lead Developer
    in reply to lukasm0001
    Using an image field in a grid might impact the overall screen performance as appian has to load the image for every row in the grid. If the grid size grows big then the number of images to be loaded will also grow to hamper the overall user experience.

    The best choice for this requirement would be to use the checkbox or radio button as suggested by Tj and parag.
Reply Children
No Data