Hello all,
So I have an interface where I'm trying to make only one field editable.
For the rest of the fields I´m just add variables to store Boolean values and then based on these values I configure mine readOnly parameters. Like the following:
But I have on the interface a GRID.
How can I make it read only ?
Regards,
Discussion posts and replies are publicly visible
Hi Victoria, You would need to configure your grid rule . In the grid rule you would need to set readOnly parameter for the fields you want to make read only and them from the main interface you can pass value for readOnly and it will work.
In order to configure,
I can just use this one right?
or should I go deeper ? Like here ?
yes, you would need to configure both of these rules and pass readOnly value from parent rule.
You´ve been very helpful. Thank you very much.
At the deepest level ( at a minimum in the rule called by a!applyComponents() ), you'll need to flip the readOnly:true flag on the components that wish to be displayed as readOnly. Set readOnly: false on field that you wish to allow your end-user to edit.If, as I've experienced many times, the expression that is called using applyComponents is in fact calling a variety of input types, you'll need to take some care and caution as to where you apply the read-only conditions.
Hi victoriab0001,
A very quick suggestion, please avoid passing values without keywords. One very major disadvantage of it is, if you add a new RI in the called rule, and do not pass a value for it in all its dependents, then that will start throwing error.