Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Programmatically read the type of a property in a datatype

$
0
0
Ok. So now I can iterate through the properties and their types of a datattype. I use it for generating corresponding form elements. However, it does not give me access to information added to the form markup of a datatype - that is e.g. if it needs to be a readonly formelement.

The form markup is in XML and I've found the documentation on the subject here: http://docs.composite.net/Data/Customizing-Datatypes/Editing-Form-Markup

However, how can i access the form markup of a datatype programmatically? I've tried with,
var dataTypeDescriptor = DynamicTypeManager.GetDataTypeDescriptor(typeof (Datatype));

var xml = dataTypeDescriptor.ToXml();
but that only gives me the DatatypeDescriptor XML which is not the form markup.

I think I need to access the form markup of the datatype to be able to generate/render the correct form elements. Anyone got a different take on this or know how to access the form markup?

Thx!

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>