Copied to clipboard

Flag this post as spam?

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


  • Johannes Giske 8 posts 121 karma points
    Jan 26, 2017 @ 11:21
    Johannes Giske
    1

    Get prevalue for value/id in dropdownlist used in a grid component

    I'm using Umbraco grid (with leblender). Several of my Grid Components have a dropdownlist with several options. My problem is that all I can seem to get my hands on is the ID of the selected dropdown value, and not the actual value itself.

    If i know that one grid component has selected a value corresponding to the ID "54", is there a way to find out what that means?

    Note that I'm not rendering the grid the "normal" way. I'm currently reading the full grid JSON data which is stored on the content node, and passing a modified JSON to a react component which will render the grid.

    An example of what I'm trying to do:

    var optionId = (int)gridControlValue.First["dimensions"]?["value"];
    /* This is where I'm stuck */
    var option = SomehowGetPreValueFromId(optionId);
    
  • Damiaan 442 posts 1301 karma points MVP 6x c-trib
    Jan 27, 2017 @ 23:14
    Damiaan
    3

    Do you mean @Umbraco.GetPrevalueAsString(...) ?

Please Sign in or register to post replies

Write your reply to:

Draft