I want to hide some fields/labels in the listView depending on a record value. I tried the following with onRender:
var rec = event.getRecord()
if (rec["xvalue"] == 1) {
try {
elements.xlabel.visible = true;
elements.xfield.visible = true;
} catch (e) {}
} else {
try {
elements.xlabel.visible = false;
elements.xfield.visible = false;
} catch (e) {}
}
When showing the form everything seems to be ok but by clicking on a checkbox, the hidden label and field is shows. Is that a bug or is it my mistake?
Another problem: The onRender is fired all the time when the form is shown. That can’t be correct!?