Copied to clipboard

Flag this post as spam?

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


  • alexant 22 posts 42 karma points
    Aug 21, 2013 @ 14:33
    alexant
    0

    Sort children nodes on its properties with surface controller

    I have children of my page model of a "kurs" document type.

    The "kurs" document type has following properties:

    • "typ" of Dropdown with predefined values
    • "intensiv" of Checkbox
    • "begin" of date picker
    • "ende" od date picker
    • "price" of Numeric

    My aim is to get the nodes be filtered through some surface controllers on the site

    (such as Dropdown, Checkbox, Input..) and the filtered list of the "kurs"-nodes to be listed.

    ..So I can't start! Dont get the Idea, how to get them be sortet.

    Schould I set a new var - as a list of nodes - such as IEnumerable ?

    Please help!

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 26, 2013 @ 10:52
    David Brendel
    0

    The normal thing would be sorting with OrderBy in linq.

    So you can fetch the current node in your surface controller and then fetch the children and use somthing like node.Children.OrderBy(x => x.price) to sort the nodes. This returns an ienumerable which you can return to your partial view.

Please Sign in or register to post replies

Write your reply to:

Draft