I tried the define and refresh approach mentioned in the docs, but it had no effect. Now I’m at a loss. Is this possible?
...
{view:"toggle",
type:"iconButton",
offIcon:"unlock",
onIcon:"lock",
offLabel:"Edit",
onLabel:"Read",
inputWidth:80,
width:80,
value:"Read",
click: function() {
// TODO: This doesn't work!
if(this.getValue() === "Read") {
$$(dtbl_id).define("editable", true);
$$(dtbl_id).refresh();
} else {
$$(dtbl_id).define("editable", false);
$$(dtbl_id).refresh();
}
},
align:"right"}
...