Copied to clipboard

Flag this post as spam?

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


  • Raj Kumar 3 posts 23 karma points
    Jan 08, 2015 @ 10:33
    Raj Kumar
    0

    Get value of umbraco datatype in code

    I have created a checkbox list type of data type in umbraco. see below screen shot enter image description here

    I am able to get the text value of this data type which is "All" in this case. But I am unable to get the Value in code.

    umbraco.library.IProperty property = node.GetProperty("countries");
    string val = property.Value;
    

    I also looked at all the property fields but Value of this is not available. Any one has any idea I am using Umbraco 6.2.4

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Jan 08, 2015 @ 10:39
    Dennis Aaen
    0

    Hi Raj,

    Try to see the documentation about how to get data out of the checkbox list. http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors/Checkbox-List There a examples for Razor and XSLT. I you are not using the old DynamicNode Razor, and I recommend you not to do this take a look at this http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/CheckBox-List

    I think that you can use the dynamic or strongly typed example from this http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/CheckBox-List

    Hope this helps,

    /Dennis 

  • 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