I have problem to sort resource's appointment in webdayview with multiple resources
for instance, in this webdayview, I have multiple resources Conf.Room A and Conf Room B (From left to right), but in the WebDayView, the resources' appointments are sorted oppositely (Room B - Room A).
Is there any way to arrange the order of resources' appointments in WebDayView so that the resources caption and resources' appointments keep the same order?
Hello y1lin,
Thank you for posting on Infragistics forum.
Normally the sorting of the appointments is done automatically and is based on their StartDateTime and on their Duration. When they are sorted by these criteria additional sorting is made on Subject in alphabetical order.
This kind of sorting is made in order to ensure proper operation of the schedule controls and components.
Is the data provided for the schedule ordered in some way or you are using random data for it?
Alex, Thanksfor your quick response
I would like to order appointments by the resource ID if they are in the same timeslot.or overlapped.
Sometimes, the StartDateTime, Duration, Subject, and the fields could be all the same, except for Resource ID.
The example I provided. Both resources (RoomA, RoomB) have the same timeslot. On the resource name caption, it's ordered from left to right by resource id (RoomA - RoomB).I would like to make the appointments sorted as the same as the one on resource name caption.if their timeslots are the same or overlapped.
Currently this type of sorting is not available for the appointments. The main reason for this is the need for proper synchronization of the appointments based on their Start Time and Duration.
If this default sorting is changed the operation of the entire control may become inaccurate, since the appointments will be now sorted not by the date and time but by the resource ID.
What can be done in your scenario is to add appointments like follows:
…
this.CreateAppointment(10, 30, "blueCss", 20); // displayed third
this.CreateAppointment(10, 30, "redCss" ,1); // displayed second
this.CreateAppointment(10, 30, "", 20); // displayed first
As you can see the last added appointment will appear first in the list and vice versa.
Test this approach and let me know if it works in your project.