Hallo Telerik-Team,
in our application we want to display empty rows in the ScheduleView. These rows are readonly and will have a special look.
My idea was to create a special kind of Resource (SpacerResource) with a custom style. This works fine and I can add them between the other resources to insert the empty rows. I also generate a readonly SpacerSlot to which I add all the SpacerResources. A custom SpecialSlotStyleSelector is used to display the empty rows the way we want. This also works fine.
Now for the problem: If no SpacerRow is added to the resources and therefore the SpacerSlot.Resources list is empty, drag&drop of our Appointments does not work anymore. Note that the SpacerSlot is always added to the list of special slots, even when no SpacerResource instances exist. If I add a SpacerResource and "register" it in the SpacerSlot, the drag&drop works again. The ScheduleView is used in TimeLineView only.
To me this seems to be a bug. Would you please tell me if I do something wrong or if this is indeed an incorrect behavior?
The special slot is created like this:
01.public static Slot GenerateSpacerSlot(DateTime viewportStart, DateTime viewportEnd)
02. {
03. return new Slot()
04. {
05. Start = viewportStart.StartOfDay(),
06. End = viewportEnd.EndOfDay(),
07. IsReadOnly = true,
08. TimeZone = TimeZoneInfo.Utc,
09. RecurrencePattern = new RecurrencePattern(
10. null,
11. RecurrenceDays.EveryDay,
12. RecurrenceFrequency.Weekly,
13. 1,
14. null,
15. null)
16. };
17.}
The parameters define the current viewport displayed. StartOfDay() and EndOfDay() are custom extension methods.
Regards,
Hendrik