Controller file:
settings = {
'view': {
columns: [
{ data: col1 },
{ data: col2 }
],
readOnly: true
},
'validate': {
{ data: col1, validator: this.envelopesColumn1Validator },
{ data: col2, validator: this.envelopesColumn2Validator }
],
readOnly: false,
beforeValidate: function (value, row, prop, source) {
return { "value": value, "row": row, "loadType": this.getData()[0] }
},
}
HTML part:
<hot-table [hotId]="hotTableId" [data] = "envData"
[settings] = "settings[dataMode]"
</hot-table>
So as and when I need to enable and disable validations, I update the value of dataMode variable to either ‘view’ or ‘validate’, but the validations are not running as expected.