Hiding a property using ScaffoldColumn

Vote:
 

I have done some property hide using ScaffoldColumn in code. But when in Admin mode i have checked "display in edit view" check box under content type then this porperty is displayed in editor screen once again.

So how i will disable that check box "display in edit view" and hiding the property from code base permanently.So in admin no one can checked the "display in edit view"  anymore.

#155520
Sep 20, 2016 9:21
Vote:
 

What about hooking into ContentTypeRepository events and listen for updates on that content type? And if value is changed - set it back to false.

#155526
Sep 20, 2016 12:11
Vote:
 

If you never want the property to be editable in EPiServer or even show up there you can do;

[Ignore]
public string PropertyOnModelThatIdontWantToBeEditable { get; set; }



If you just want to update your page/blocktype to whats defined in code then you can do a "Revert to default" on the type in admin.

#157869
Sep 23, 2016 14:45
Ted
Vote:
 

I think Jens' suggestion works, but keep in mind that an [Ignore] attribute will also exlude the property from indexing.

#157886
Sep 24, 2016 19:10