Copied to clipboard

Flag this post as spam?

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


  • bob baty-barr 1180 posts 1294 karma points MVP
    Mar 23, 2015 @ 02:28
    bob baty-barr
    0

    How would i go about rendering dropdown values?

    i am not getting any values from dropdowns in my nested content... any thougths on the way to retreve those values? Just using the simple dropdown list.

    thanks,

    bob

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 09:59
    Matt Brailsford
    0

    Hey Bob,

    In what sense do you mean get the dropdown values? Just getting the selected option?

    I've just setup a dummy dropdown list property, assigned it to my NC doc type, and selected a value in the editor. In my razor file I simply call the following to get it's value:

    @item.GetPropertyValue("myDropdownPropAlias")
    

    (where item is an IPublishedContent within a foreach loop of the the NC items)

    Is this not working for you?

    Many thanks

    Matt

  • Debashis chy 1 post 21 karma points
    May 27, 2018 @ 09:55
    Debashis chy
    0

    it don't work

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 10:07
    Matt Brailsford
    1

    Ok, I see the problem. You are using NC inside a DTGE and that looks like it's just returning the ID, rather than resolving the value.

    I'll take a look and get back to you.

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 23, 2015 @ 11:36
    Matt Brailsford
    1

    Hey Bob,

    So it turns out it was an issue with DTGE not serializing values correctly at render time. I've released a 0.1.1 package on the DTGE page with a fix in place if you want to download it and update your package.

    https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor

    Thanks for reporting the issue.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft