Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have created a custom datatype in Umbraco 4.7 that renders a dropdown List.
In the Database datatype section I have added 2 text/value pairs, everything works fine when the datatype is then used on a document type.
Now, I have the need for get hold of the text/value pairs for this datatype in C# code. Until now I have tried the following C# code:
var meetingDatatype = umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetAll().FirstOrDefault(r => r.Text == "MeetingType");
It returns some kind of object, but how do I get the text/value pairs from the meetingDatatype object?
Thanks in advance for any hints :-)Thomas (not an Umbraco shark, but slowly improving...)
Ahhhh - I found it...
((KeyValuePrevalueEditor)meetingDatatype.DataType.PrevalueEditor).Prevalues
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Umbraco 4.7 Custom Datatype
I have created a custom datatype in Umbraco 4.7 that renders a dropdown List.
In the Database datatype section I have added 2 text/value pairs, everything works fine when the datatype is then used on a document type.
Now, I have the need for get hold of the text/value pairs for this datatype in C# code. Until now I have tried the following C# code:
It returns some kind of object, but how do I get the text/value pairs from the meetingDatatype object?
Thanks in advance for any hints :-)
Thomas (not an Umbraco shark, but slowly improving...)
Ahhhh - I found it...
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.