function writeprotect_grid(grid) {
    for (i = 0; i < grid.columns.length; i++){ //disable inline editing for all columns of the grid
        grid.columns[i].editable = null
    }
    grid.refresh()
}
This function iterates through all configured columns of the grid and removes the editable object. This leaves all grid fields read only.
@param grid - w2ui grid object