Copied to clipboard

Flag this post as spam?

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


  • Niels Lyngsø 21 posts 99 karma points hq
    Mar 12, 2018 @ 15:13
    Niels Lyngsø
    0

    Get only Ids from Multinode TreePicker

    Is there any way to get the Ids without getting the IPublishedContent objects?

    I would like to do something like this, but this does not work for me:

    var Result = node.GetPropertyValue<IEnumerable<int>>("propertyName")
    

    Thanks

  • Morten Bock 1867 posts 2138 karma points MVP 2x admin c-trib
    Mar 12, 2018 @ 15:29
    Morten Bock
    0

    Have you tried int[] instead?

    Worst case, you could just get it as a string, and do the split/parse yourself.

  • Niels Lyngsø 21 posts 99 karma points hq
    Mar 12, 2018 @ 16:36
    Niels Lyngsø
    0

    I have tried the following types:

    <IEnumerable<int>>
    <IEnumerable<string>>
    <List<int>>
    <List<string>>
    <int[]>
    <string[]>
    

    All of them returning null... :-/

  • Morten Bock 1867 posts 2138 karma points MVP 2x admin c-trib
    Mar 12, 2018 @ 16:47
    Morten Bock
    0

    If you just do <string> you should get a comma separated string.

Please Sign in or register to post replies

Write your reply to:

Draft