Sorting Events by Date - General Discussions - General Discussions - Progress Community
 General Discussions

Sorting Events by Date

  • Sorting Events by Date
  • Hi,

    I have currently listed a set of events that we are attending but they are not appearing in order of date. Is there a way that you put them in chronological order?
     
    Kind regards
  • Hello Fran,

    There is a filter expression property of the definition Home > ControlDefinition > Views > EventsFrontendList
    You can use PublicationDate ASC or PublicationDate DESC

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Hi Ivan,

    I have tried entering these the both of these but none of them worked...........the events are still not being ordered chronologically.

    They start out in order but then towards the end the dates start to become muddled up.

    Any ideas why this is occurring?
  • Hello Fran,

    I am using the latest build - 4.0.962.0. Do you use the same? If so can you past the values you enter and some screenshots that represents the actual issue and I will try again to reproduce the problem.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Hi Ivan,

    Sure no problem, I have actually ended up deleting the code by accident so now underneath 'Events View' - I am entering the following into 'Filters' within the advanced tab:

    SortExpression: PublicationDate DESC
    FilterExpression: [This is Blank as I accidently deleted the code that was there before]
    SummarySettings: None
  • 236887_eventsfilter.zip
    Hi Fran,

    I tried again to replicate the issue locally with no avail. I prepared a short video for you. Today we released our weekly build, so you can install a sample project with it and give a try.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Hi,

    I think what Fran is asking and what I'm asking is there a way to sort it by Start Date and not publication date?

    If I set the SortExpression to be "EventStart DESC" it doesn't sort it the proper way. I'm thinking that should work since that's a property of the Event Model? 

    I realize I could create my own Control, etc, but shouldn't this work? 

    Thanks

    -Matt

  • I'm working on the same problem. When you set the SortExpression, if you go back in, is it set back to "PublicationDate DESC"? That's what mine is doing.
  • 255283_evdef.png
    Hi,

    You can set the SortExpression from the definition and you can also add a TextField that is mapped to EventStart.

    Regards,
    Ivan Dimitrov
    the Telerik team
  • Hi Ivan,

    This actually didn't work originally and I found out why.

    Inside of the Event Widget properties, under List settings there is a Sort events drop down. On my existing widget this was set to "Oldest First". When I went into the advanced menu and tried to set the sort expression, it would always default back to PublicationDate ASC (i.e. the same as the sort event drop down).

    When I added in a new event widget, the sort event drop down was empty, which would allow me to set the sort expression (either through advance or your way above) 

    Can we get the ability to set the sort event drop down to be "blank" so that it removes the sort expression?

    Thanks

    -Matt
  • Or, better yet, can we get the Sort Event drop down to be EventStart ASC or DESC?

    Thanks a ton, Matt, for posting your solution. Working beautifully for me now.

    Jeff
  • Hello Jeffrey,

    Or, better yet, can we get the Sort Event drop down to be EventStart ASC or DESC?

    We are going to have this with this week's internal build, and officially with Q1.

    Regards,
    Georgi
    the Telerik team
  • I was able to set the sort by StartDate through the Settings and when I placed a new Events Widget on the page it does sort by StartDate, however, when I chose a template for the events listing it reverts back to Publication date.

    In Matt's post he said that "When I added in a new event widget, the sort event drop down was empty, which would allow me to set the sort expression (either through advance or your way above) "

    But my drop down is never empty and it always filled with "Newest First"

    I am usingSitefinity 4.0.1098.0 SE

    Any ideas?

    Thanks.
  • Hello Laura,

    By default the public control is sorted by "PublicationDate DESC" and this is set in the EventsDefinitions class. Generally this setting overrides the other Sort Order set in the control instance. You can try to set the property value through the configurations - Advances >> Settings.

    I suggest that you should test with the LIB that was released last week.

    Best wishes,
    Ivan Dimitrov
    the Telerik team