diff --git a/src/GridFieldEditableColumns.php b/src/GridFieldEditableColumns.php index 7dc89cf..cffba22 100644 --- a/src/GridFieldEditableColumns.php +++ b/src/GridFieldEditableColumns.php @@ -56,10 +56,6 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements public function getColumnContent($grid, $record, $col) { - if (!$record->canEdit()) { - return parent::getColumnContent($grid, $record, $col); - } - $fields = $this->getForm($grid, $record)->Fields(); if (!$this->displayFields) { @@ -104,6 +100,10 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements $field->setName($this->getFieldName($field->getName(), $grid, $record)); $field->setValue($value); + if (!$record->canEdit()) { + $field = $field->performReadonlyTransformation(); + } + if ($field instanceof HtmlEditorField) { return $field->FieldHolder(); }