Created methods to set the readonly status and for hide/show the detail button