How to set cell edit mode disable or can't be changed

For some criteria, I have to set some cell can’t be changed. Is there any way to set the cell edit mode disable or can’t be changed?

There are two ways to achieve necessary functionality

a) use onEditCell event, this event called each time when edit operation started, by returning “false” from it, operation can be blocked.
b) you can change type of cell on the fly by
    grid.setCellExcellType(…