I discovered a (possibly convoluted) way of getting these. Note: the node object in the example below is of type Document
// get the key values defined in the datatype for property "myProperty"
var keyValues = ((KeyValuePrevalueEditor)node.getProperty("myProperty").PropertyType.DataTypeDefinition.DataType.PrevalueEditor.Editor).PrevaluesAsKeyValuePairList;
// get the value which maps to the int which Umbraco saves when you select the radiobutton
var value = umbraco.library.GetPreValueAsString(int.Parse(node.getProperty("myProperty").Value.ToString()))
0 comments:
Post a Comment