Hi,
this now looks really promising and finally works like expected. Thanks very much.
One thing I've noticed now, is that the integrated function ToExceptionsXml doesn't take the rules added to an exception into account, so they can't be easily stored.I will circumvent now around this in my project, but can you have a look at this as well or should I open a new forum entry for this (possibly not desired) behaviour?
Thanks,Stefan
Hello Stefan,
We have shipped out a new service release where your issue is resolved. I'd be glad to find out if you had tested it out and if it had met your requirements.
You can download the Service Releases by logging to our web site and going to Account\My Keys and Downloads page.
Thank you for using Infragistics Components.
Hi Stefan,
I have investigated the behavior of ProjectCalendar.ToExceptionsXml() method, and I have asked our engineering staff to examine this further. To ensure that it will receive attention, I have logged this behavior in our internal tracking system with a Development ID of 242070. This will be assigned to a developer in a future sprint to review my investigation and confirm my findings or to offer a fix, or other resolution.
In the meantime what I can suggest as a workaround in order to properly save the ProjectCalendarExceptions is to use a combination of ProjectCalendar.ToExceptionsXml() and DateRecurrence.ToICalendarString() methods. The second method would save the rules properly so they can be restored and reassigned to the ProjectCalendarException instance later. A very simplified implementation of the suggested approach should look as follows:
List<DateRecurrence> dateRecurrences = new List<DateRecurrence>(); foreach (var recurrence in recurrences) dateRecurrences.Add(DateRecurrence.FromICalendarString(recurrence)); var projectExceptions = ProjectCalendar.FromExceptionsXml(strExceptions); for (int i = 0; i < projectExceptions.Count; i++) { projectExceptions[i].Recurrence = dateRecurrences[i]; }
foreach (var recurrence in recurrences)
dateRecurrences.Add(DateRecurrence.FromICalendarString(recurrence));
var projectExceptions = ProjectCalendar.FromExceptionsXml(strExceptions);
for (int i = 0; i < projectExceptions.Count; i++)
{
projectExceptions[i].Recurrence = dateRecurrences[i];
}
Please let me know if you need more information.