Hi Jonas,
Setting a cell as ReadOnly also makes it ReadOnly for programmatic changes too.
Please refer to the following link to know more on setting properties for the ReadOnly cells.
How to set style properties for Read-Only cells in Grid?
Let us know if you have any further queries.
Regards,
Calvin.