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...
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
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...
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.