Copied to clipboard

Flag this post as spam?

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


  • jigar 170 posts 233 karma points
    May 25, 2009 @ 12:38
    jigar
    0

    Need help for Dropdown and Dropdown datatype

    [size=6]Help regarding Dropdown.

    Hi All,

    I am new to Umbraco and I stuck up in a problem.

    I have created one datatype for dropdown e.g Us-Dropdown with render control of Dropdown list, publish keys and added values us USA states in the same.

    e.g
    Text Value
    AZ 19 Delete
    MA 20 Delete
    NV 21 Delete

    After that I used them as property in one document type and added them under generic property tab.

    E.g. State (State), Type: US: StateDropDown.

    Then I created one template for the same and I placed that state property following way.



    After that from Content tab I create one entity for that template and render it.
    When I render the page I can see the Number of the state that I selected while creating the same.

    E.g 19. ](*,)

    Please help me in getting the name rather than number.

    Hope you understood my problem.


    [/size]

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 25, 2009 @ 12:44
    Dirk De Grave
    1

    Hi,

    If you need the value rather than the key, use umbraco.library.GetPrevalueAsString(id)
    If you'd like to use this function inline, have a look at http://umbraco.org/documentation/books/inline-xslt

    Hope this helps.

    Regards,
    /Dirk

Please Sign in or register to post replies

Write your reply to:

Draft