How to make a readOnly cell editable programmatically

Tags: #<Tag:0x00007f8b233ac950>

Hi,
I would like to know how to make a read only cell editable programmatically.
I have tried several ideas such as this one https://stackoverflow.com/questions/18304026/when-using-handsontable-how-to-force-a-selected-cell-into-edit-mode but I failed.
Please help

1 Like

Hi @re7re8

I do not know the exact scenario but here is an example on how to edit a readOnly cell after clicking ENTER button http://jsfiddle.net/handsoncode/yg666npL/

If your scenario is different let me know.

1 Like

Hi @aleksandra_budnik,
Please check this scenario http://jsfiddle.net/j8cgh3sk/

Unfortunately, it doesn’t work. It should work like this http://jsfiddle.net/yjrnpagj/ with the outsideClickDeselects turned off.

I think that the issue I have reported some time ago can be the cause https://github.com/handsontable/handsontable/issues/4446

Instead of using cells property to make the cells read only, I made them readOnly manually using loops and setCellMeta.
Please check this Jsfiddle and tell me if there is any possible optimization
http://jsfiddle.net/j8cgh3sk/1/

Hi @re7re8

it works as expected for a single cell and it is a great workaround as the updateSettings is not working now.