We have a problem with RadScheduler when an appointment is dragged.
The attached RadScheduler1.jpg shows our screen before a drag/drop is done. The appointment to be moved is highlighted in red.
The intention is that we drag this appointment over to 12 December.
RadScheduler2.jpg shows what happens while the drag is in progress. The mouse NSEW cursor is actually located over the 12 December cell, yet the appointment position is way out of step with the mouse position and appears on 29 November. In fact, most dragging seems to want to put the appointment on the top row. If we scroll up a bit and move the mouse down, the dragged appointment can go to the next row, but the mouse cursor is off the bottom of the scheduler cells, although it is still within the scheduler.
Upon dropping, the appointment drops where the mouse is, so it appears that it is out of place during the drag. When it has dropped, it looses its background colour (which we set in OnAppointmentDataBound) and appears grey.
This is some of our code:
protected void radScheduler_OnAppointmentDataBound(object sender, SchedulerEventArgs e) {
CustomEvent customEvent = (CustomEvent)e.Appointment.DataItem;
e.Appointment.BackColor = System.Drawing.Color.FromArgb( Convert.ToInt32("0x" + customEvent.Colour, 16));
e.Appointment.ToolTip = customEvent.Description.Replace("<br/>", "\n");
}
protected void radScheduler_OnAppointmentUpdate(object sender, AppointmentUpdateEventArgs e) {
var modifiedAppointment = e.ModifiedAppointment;
DiaryEvent diaryEvent = omDb.FindDiaryEvent(Convert.ToInt32(modifiedAppointment.ID));
if (diaryEvent == null) {
SetRecordError("DiaryEvent", Convert.ToInt32(modifiedAppointment.ID));
e.Cancel = true;
} else {
// Check for conflicts with the new date
bool bGotConflicts = false;
...........
if(!bGotConflicts) {
// No conflicts or not checking for conflicts, so update the appointment
diaryEvent.StartDateTime = modifiedAppointment.Start;
diaryEvent.EndDateTime = modifiedAppointment.End;
omDb.InsertOrUpdateDiaryEvent(diaryEvent);
radScheduler.Rebind();
}
}
}
Note that we Rebind() after updating the database. This is not causing radScheduler_OnAppointmentDataBound to be called, so this probably explains why the colour is being lost.
The above is the month view.
The week view also seems to be full of bugs - RadScheduler3.jpg shows the 'before' with the event to be dragged marked. We drag the event across to Tue, 13 and nothing happens - the appointment does even get 'picked up' !
These issues occur in both Edge and Chrome. We are using Telerik 2016.2.607.40.
Our RadScheduler is defined as follows:
<telerik:RadScheduler ID="radScheduler" runat="server" RenderMode="Lightweight"
Height="800"
OnAppointmentUpdate="radScheduler_OnAppointmentUpdate"
OnAppointmentDataBound="radScheduler_OnAppointmentDataBound"
OnAppointmentContextMenuItemClicked="radScheduler_OnAppointmentContextMenuItemClicked"
OnClientAppointmentContextMenuItemClicked="ShowProgress"
OnNavigationComplete="radScheduler_OnNavigationComplete"
OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
OnClientAppointmentEditing="OnClientAppointmentEditing"
RowHeight="40px"
OverflowBehavior="Auto"
SelectedView="WeekView"
ShowFooter="false"
DayStartTime="00:00:00" DayEndTime="23:59:59"
FirstDayOfWeek="Sunday"
LastDayOfWeek="Saturday"
EnableDescriptionField="true"
AppointmentStyleMode="Default"
DataKeyField="Id"
DataStartField="Start"
DataEndField="End"
DataSubjectField="Title"
DataDescriptionField="Description"
AllowInsert="false"
AllowDelete="false"
DayView-SlotWidth="70" DayView-HeaderDateFormat="ddd dd MMM yyyy"
WeekView-SlotWidth="150" WeekView-HeaderDateFormat="ddd dd/M yyyy"
MonthView-SlotWidth="200" MonthView-HeaderDateFormat="ddd dd MMM yyyy" MonthView-AdaptiveRowHeight="true"
YearView-SlotWidth="250" YearView-HeaderDateFormat="MMM yyyy">
<DayView UserSelectable="true" />
<MultiDayView UserSelectable="true" />
<WeekView UserSelectable="true" />
<MonthView UserSelectable="true" />
<YearView UserSelectable="true" />
<TimelineView UserSelectable="false" />
<TimeSlotContextMenuSettings EnableDefault="true" />
<AppointmentContextMenuSettings EnableDefault="true" />
<AppointmentTemplate>
<div><%#Eval("Subject") %></div>
<div><%#Eval("Description") %></div>
</AppointmentTemplate>
<AppointmentContextMenus>
<%--The appointment context menu interaction is handled on the client in this example--%>
<%--See the JavaScript code above--%>
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
<Items>
<telerik:RadMenuItem Text="Edit" Value="EditSchedule"></telerik:RadMenuItem>
<telerik:RadMenuItem IsSeparator="True"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Resources" Value="CourseResources"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Course Info" Value="CourseInfo"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Course Instructors" Value="PanelInstructors"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Course Trainees" Value="PanelTrainees"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Support Material" Value="SupportMaterial"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Course News" Value="CourseNews"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Trainee Progress" Value="ViewProgress"></telerik:RadMenuItem>
<telerik:RadMenuItem IsSeparator="True"></telerik:RadMenuItem>
<telerik:RadMenuItem Text="Duplicate" Value="DuplicateSchedule"></telerik:RadMenuItem>
</Items>
</telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>
</telerik:RadScheduler>
Can someone please advise what might be causing this ?
There seems to be a serious bug with the mouse and dragged cell being completely out of step with each other. Coupled with appointments not even getting picked up by drag, and other appointments which won't seem to drag where we want them, this makes RadScheduler a rather buggy showstopper for delivering to our client. We don't appear to have any control over the functionality which is failing.
Additional suggested improvements:
- Display rotator wheel when changing between views
- Display rotator wheel when appointment is dropped (to cover scenario of back-end server processing delay)
- Allow HTML is tooltips and/or make it properly template-driven
Graham Plowman