Editable grid

Certified Associate Developer

i have an editable grid and in single row i have checkbox and textfields, i need to make textfield readonly false based on selected option in checkbox in that particular row. Please let me know if any workaround available for this

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer

    HI  

    Please check this code. It might help you

    a!localVariables(
      local!options:{"Yes","No"},
      local!data:{
        a!map(check:"Yes",text:"sample text")
      },
      a!gridLayout(
        headerCells: {
          a!gridLayoutHeaderCell(label:"Checkboxes"),
          a!gridLayoutHeaderCell(label:"Textfield"),
        },
        columnConfigs: {
          a!gridLayoutColumnConfig(width: "DISTRIBUTE"),
          a!gridLayoutColumnConfig(width: "DISTRIBUTE"),
        },
        rows: a!forEach(
          items: local!data,
          expression: a!gridRowLayout(
            contents: {
              a!checkboxField(
                choiceLabels: local!options,
                choiceValues: local!options,
                value: fv!item.check,
                saveInto: fv!item.check
              ),
              a!textField(
                value: fv!item.text,
                saveInto: fv!item.text,
                readOnly: if(
                  fv!item.check="Yes",
                  true(),
                  false()
                )
              )
            }
          )
        ),
        addRowLink: a!dynamicLink(
          label:"Add new row",
          saveInto: a!save(local!data,append(local!data,a!map(check:"",text:"")))
        )
      )
    )

  • 0
    Certified Associate Developer
    in reply to JayaPrakash Ravipati

    Thank you all for the quick response. Got the resolution

Reply Children
No Data