Copied to clipboard

Flag this post as spam?

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


  • Damiaan 438 posts 1290 karma points MVP 3x 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?

  • 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