Hi,
Is there any way to display textField/radioButtonField 's in gridRowLayout based on satisfying given condition ? I have a column, it can be of either dropdown or text field or radiobutton. Type of row has to be decided based on column header selection (column header selection happens dynamically). I have tried using required option but its not working.
a!gridRowLayout( contents: { a!dropdownField( labelPosition: "COLLAPSED", placeholder: "Please select one", choiceLabels: {"A","B","C","D"}, choiceValues: {"A","B","C","D"}, value:"", saveInto: a!save(ri!answerList.answerValue,save!value), required: exact(fv!item.type = "grid",true(),false()), disabled: rule!APN_isTrue(ri!isReadOnly) ), a!radioButtonField( value: "", choiceLabels: {"False", "True"}, choiceValues: {false, true}, saveInto: a!save(local!gridQuestionsList.defaultAnswer,save!value), required: if(fv!item.type = "radio button",true(),false())
)
}
Discussion posts and replies are publicly visible
As mentioned previously - if you're conditionally hiding a component in a row using the 'showWhen' attribute you need to a) hide it for ALL rows and b) hide the corresponding header cell. If you're trying to hide for one row and then not for another this will not work as ALL rows need to have the same number of components as there are header cells. An alternative is to simply conditionally replace the component you want to hide with, say, an empty, read-only a!textField()
I have given 'showWhen' to all rows and added choose function to select only rows and it worked. Thank you !!