Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

To make episerver Properties Uneditable in edit mode

Vote:
 

Hi,

Is it possible to make some of the properties uneditable in edit mode.. I set default value in code so that

editor can see the value for the propety but he/she cannot edit it.

#79608
Dec 22, 2013 19:34
Vote:
 

yep, there is an attribute you need to put on the property.

[Display(Name="Uneditable Property"), Editable(false)]
public virtual string UneditableProperty{get;set;}

    
or you can do 

[Display(Name="Uneditable Property")]
[Editable(false)]
public virtual string UneditableProperty{get;set;}

    

#79609
Edited, Dec 22, 2013 19:58
Vote:
 

If you want to hide it from edit mode, you add the attribute [ScaffoldColumn(false)]

#79610
Dec 22, 2013 20:00
Vote:
 

Hi,

Thanks Joshua , I already tried [Editable(false)] , it doesnt work, editor still can edit in edit mode.

#79617
Dec 23, 2013 8:39
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.