Copied to clipboard

Flag this post as spam?

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


  • Mark Gil Libres 24 posts 113 karma points
    Mar 17, 2015 @ 14:38
    Mark Gil Libres
    0

    OrderBy StartDate

    Hi, I got this error "At least one object must implement IComparable" when doing this code:

    var sessions = stardNode.Children().Where("NodeTypeAlias == @0", "Conference").OrderBy("DateRange");
    

    If I remove the "OrderBy", then it worked fine.

    How can I sort this by start date?

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Mar 17, 2015 @ 15:20
    Dan Diplo
    0

    You might be able to do something like this (using a strongly typed query rather than dynamics):

    var sessions = stardNode.Children().Where(n => n.DocumentTypeAlias == "Conference").OrderBy(d => d.GetPropertyValue<Diplo.DateRangePicker.DateRange>("dateRange").StartDate);
  • Mark Gil Libres 24 posts 113 karma points
    Mar 18, 2015 @ 08:27
    Mark Gil Libres
    0

    thanks Dan! :)

    I love your plugin... if you could also have an option to only display Time (TimeRangePicker) it would also be great! ;)

Please Sign in or register to post replies

Write your reply to:

Draft