Sorting Events by Date

Posted by Community Admin on 03-Aug-2018 11:16

Sorting Events by Date

All Replies

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 09-Dec-2010 00:00

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?

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 09-Dec-2010 00:00

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

Posted by Community Admin on 10-Dec-2010 00:00

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

Posted by Community Admin on 09-Mar-2011 00:00

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

Posted by Community Admin on 09-Mar-2011 00:00

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.

Posted by Community Admin on 10-Mar-2011 00:00

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

Posted by Community Admin on 10-Mar-2011 00:00

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

Posted by Community Admin on 10-Mar-2011 00:00

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

Posted by Community Admin on 15-Mar-2011 00:00

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

Posted by Community Admin on 23-Mar-2011 00:00

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.

Posted by Community Admin on 24-Mar-2011 00:00

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

Posted by Community Admin on 24-Mar-2011 00:00

Hi Laura,

Just a quick follow-up: in our latest internal build, we have EventStart and EventEnd added as sorting criteria in the drop down.
I hope you find this information useful.

Regards,
Boyan Barnev
the Telerik team

Posted by Community Admin on 12-May-2011 00:00

Hi there,

Can we add a custom sorting criteria to the dropdown list? I'd like to sort by MyCustomField.

Thanks.

Posted by Community Admin on 17-May-2011 00:00

Hi Jonathan,

That's a tough one, currently we do not offer such functionality (you can still sort by that custom field, there's just no way for now to include it in the drop-down), but that you for pointing out the need for it. I have logged this as a feature request, you can check its status in PITS and vote for it on this public URL.

Regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-May-2011 00:00

Hi Telerik Admin,
I think that would be nice indeed!
Thanks for your reply.

Jonathan.

Posted by Community Admin on 13-Feb-2015 00:00

i am STILL having issues with this in v7.  I figured out how to work around it.  The problem is that, after following all the advice above - the answer is in there but you have to be diligent because when you set the sort events under "Paging, limit and sorting" section in the events widget properties, it always still defaults back to some incorrect value!  The value I want is, "As set in advanced mode".  Eventually, after setting in advanced mode and just hoping the value took i was able to get it to work (after saving the widget properties)

This thread is closed