Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ajju 25 posts 148 karma points
    Feb 13, 2018 @ 07:42
    Ajju
    0

    Rendering DrowDown Prevalues from Backoffice

    Dear Umbracians,

    I have Drop Down list property with Prevalues added, I want it to display all the values in the Partial View frontend.

    Please help.

    Thanks

  • Ajju 25 posts 148 karma points
    Feb 13, 2018 @ 11:03
    Ajju
    2

    It got working with below code

    @using umbraco.cms.businesslogic.datatype
    
    @foreach (var categoryPrevalue in ApplicationContext.Services.DataTypeService.GetPreValuesByDataTypeId(1203).ToList())
                {
                    <option value="@categoryPrevalue.ToLower()">@categoryPrevalue</option>              
                }
    

    Link: https://stackoverflow.com/questions/25578849/umbraco-get-prevalues-in-a-data-type

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

Please Sign in or register to post replies