Foren

expando field read only

Mike Oliver, geändert vor 12 Jahren.

expando field read only

New Member Beiträge: 21 Beitrittsdatum: 04.07.11 Neueste Beiträge
How can I make an expando field read only for users, to be populated by a hook?
thumbnail
Leo Pratlong, geändert vor 12 Jahren.

RE: expando field read only

Expert Beiträge: 363 Beitrittsdatum: 06.07.10 Neueste Beiträge
I don't understand why you need read-only Expando values. You should override the model Object and add this constant on the class directly. Expando is used to allow users to define new values (which can contains DefaultValue), so it seems anti-Expando to use it as constant value (maybe I'm wrong, but it looks like that to me).

If you still want to make Expando read-only:
- define a DefaultValue for your Expando Columns.
- Override the custom-attributes component (if you use the table name "ExpandoTableConstants.DEFAULT_TABLE_NAME") to display read-only fields for the needed columns (you can for example specify that columns which begin by "ro_" are read-only fields).