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'm trying to get the values of a checkboxlist but I can't seem to figure it out.
I can get the actual property type from my document type like so
var productionPage = _contentTypeService.Get(ProductionPage.ModelTypeAlias); var propertyType = productionPage.PropertyTypes.FirstOrDefault(x => x.Alias == "ageGroups");
But after that I can't find any way to actually see what options the checkboxlist has? How can i achieve this?
Try something like
dataTypeService.GetPreValuesCollectionByDataTypeId(propertyType.DataTypeDefinitionId)
I did end up doing something similar to this, but I'll mark this as the solution as it's the correct method to use
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get the available values of a specific data type in a controller?
I'm trying to get the values of a checkboxlist but I can't seem to figure it out.
I can get the actual property type from my document type like so
But after that I can't find any way to actually see what options the checkboxlist has? How can i achieve this?
Try something like
dataTypeService.GetPreValuesCollectionByDataTypeId(propertyType.DataTypeDefinitionId)
I did end up doing something similar to this, but I'll mark this as the solution as it's the correct method to use
is working on a reply...