I have a TimeLineView with PrimaryInterval set to 1 day and an AllDay appointment spanning multiple days.
When I resize the appointment, it stops being an AllDay appointment, and the EndDate is set to the following day at 00:00.
Is there a way to force the appointment to remain an AllDay appointment when the PrimaryInterval is one day?
Hello,
I will be happy to assist you with this issue.
I was able to reproduce this issue. Upon further research you should be able to utilize the AppointmentRisized event to set the allDayEvent property to true.
Please use the following code as reference:
private void ultraTimelineView1_AppointmentResized(object sender, Infragistics.Win.UltraWinSchedule.AppointmentResizedEventArgs e) { e.Appointment.AllDayEvent = true; }
Please let me know if you have further questions regarding this matter.
Hello.
So there are no properties you can set on the TimeLineView, that changes the way it handles all-day appointments when the interval is 1 day?
I tried the code you're suggesting before asking the question here.
The problem with that is that it does not work properly.
An example:
You have an all-day appointment that starts on Jan 20 and ends on Jan 22. If you re-size that one day further, it covers Jan 20,21,22 and 23 in the calendar.
The EndDateTime will be set to Jan 24 00:00.
When you set the AllDayEvent property to true, you will include the entire day of Jan 24 as well.
I tired to fix it by altering the EndDateTime of the appointment when it was the end of the appointment that was resized. I used the following code:
private void ultraTimelineView1_AppointmentResized(object sender, AppointmentResizedEventArgs e) { if (ultraTimelineView1.PrimaryInterval is DateInterval)//only do this if the interval is at least a day. { if (e.ResizeType == AppointmentResizeType.AdjustEndDateTime) { e.Appointment.EndDateTime = e.Appointment.EndDateTime.Date.AddSeconds(-1); } e.Appointment.AllDayEvent = true;
}
The problem I have here is that e.ResizeType is AdjustStartDateTime all the time, also when I only resize the end of the appointment.
I have version 10.2.
After upgrading to version 11.2 e.ResizeType has the correct value.
After investigating this further, I noticed this issue was fixed with a service release. The ID number corresponding with this issue is 33393.
Please let me know if you have additional question regarding this matter.