WinForms - Scheduler - Sort And Group Appointments (v19.1)

15 May 2019

The DevExpress WinForms Scheduler Control now provides two events that allow you to sort and group appointments: CustomAppointmentGroup and CustomAppointmentSort. Both events are demonstrated in our Scheduler Demos, when you use the Group by Category and Sort by Category checkboxes in the right-hand options panel.

The event CustomAppointmentSort is similar to custom sort events in our Data Grid: it applies a three-way comparison to a pair of appointments. You need to write a simple piece of code to set e.Result:

  • Set e.Result to a negative value if the appointment related to the e.AppointmentLayoutInfo1 parameter should appear first
  • Set e.Result to a positive value if the appointment related to the e.AppointmentLayoutInfo2 parameter should appear first
  • Set e.Result to 0 if both appointments are considered equal and the Scheduler should utilize its default sort algorithm to arrange them

This screenshot from the DevExpress demos illustrates an example: appointments with the Out of Office status (the green appointment items in the image) are placed after appointments without assigned status.

Custom Sort

The event CustomAppointmentGroup event helps you build groups that are visually separate in the Scheduler Control. In our demos, the property e.GroupKey (an integer value used as a group index) is set according to appointment labels.

Custom Group

You can combine custom group and sort events to break down appointments into groups, and then sort each group individually.

Let’s Hear Your Feedback

If you have any comments on the new functionality, or ideas for additional extensions, please let us know. Feel free to comment below or open Support Center tickets for further discussion.

4 comment(s)
Christian Peters

Since V 12.x you guys are helping me with my custom scheduler, which allows exactly this function.

We made it throug various breaking changes - and now this!!!

I can't wait to try this, and update my code.

Thanks for this feature and the last 7 (!!!) years of support!

15 May, 2019
Jirka Rostek

Ohhhh yes baby! great!

15 May, 2019
Engº Silvio Cruz

Awesome please keep improving the scheduler  :)

15 May, 2019
Sigurd Decroos _

Is it possible to draw a collapsable group header between the different groups?

15 May, 2019

Please login or register to post comments.