I have a Model with a GridField for my SubModels. These SubModels have an SubSubModels GridField as well.
if I do $fields->makeReadonly() on my Model, it updates the GridField so that it's a GridFieldConfig_RecordViewer config that is used for my SubModels. Great! I can even navigate to my SubSubModels : it's still readonly.
Problem is : I go back (using back arrow, or breadcrumb) from my SubSubModel to my SubModel : it's not readonly anymore. I'm not sure why!
So basically : navigate once : stays readonly, navigate twice : still readonly. go back : not readonly anymore.
So here is my scenario
I have a Model with a GridField for my SubModels. These SubModels have an SubSubModels GridField as well.
if I do $fields->makeReadonly() on my Model, it updates the GridField so that it's a GridFieldConfig_RecordViewer config that is used for my SubModels. Great! I can even navigate to my SubSubModels : it's still readonly.
Problem is : I go back (using back arrow, or breadcrumb) from my SubSubModel to my SubModel : it's not readonly anymore. I'm not sure why!
So basically : navigate once : stays readonly, navigate twice : still readonly. go back : not readonly anymore.
Tested in 4.3.2.