Copied to clipboard

Flag this post as spam?

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


  • Damiaan 442 posts 1302 karma points MVP 6x c-trib
    Feb 14, 2014 @ 16:39
    Damiaan
    0

    Using IsFirst() in PropertyValueConverter

    Hi,

    I have a PropertyValueConverter for the MNTP. But when I use the .IsFirst() extension method, the IsFirst() checks the original index and not the index of the returned IEnumerable

    The multiNodeTreePicker loads in the nodeId's like this:

    var multiNodeTreePickerContent = umbHelper.TypedContent(nodeIds).Where(x => x != null);
    

    Afterwards we use thise code to pick up the property:

    var myMntp = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("myMntpProp");
    

    The first Item in myMntp returns '2' if we call .Position() and false if we call .IsFirst(). Which is corrent if we would look at the backend nodes, but not in the returned IEnumerable list.

    Has someone an idea if (and how) you would need to change the index? Or would this problem be solved if we use the new ValueConverter?

Please Sign in or register to post replies

Write your reply to:

Draft