I was notified that code (ASP.Net) that has not been touched in months was now broken. We are using the Scheduler to handle the initiation of commands being sent to devices on a regular basis. Up until today, this was working just fine. I brought up the project and ran it in the VS 2012 debugger. Sure enough, when I tried to open the context menu for the appointment, the debugger intercepted a null reference in the javascript file RadContextMenuScripts.js at line 188. this._getContextMenuElement() returns null. I further tested it on Chrome and found the same behavior.
One interesting point is that the TimeSlotContextMenu works just fine.
The definition of the AppointmentContextMenu is:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" ID="AppointmentContextMenu">
<Items>
<telerik:RadMenuItem Text="Delete" Value="CommandDelete" />
<telerik:RadMenuItem Text="Execution Summary" Value="Summary" />
<telerik:RadMenuItem Text="View Commands" Value="Commands" />
</Items>
</telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>
When the menu is opened, the following code is executed:
function RadScheduler1_AppointmentContextMenu( sender, args )
{
SelectedAppointment = args.get_appointment();
SelectedDate.val( SelectedAppointment.get_start().format( "MM/dd/yyyy" ) );
AppointmentContextMenu.show( args.get_domEvent() );
}
I traced from the last line and the crash happens when the menu tries to show itself.
If you would like to view what is happening, let me know and we can get that set-up.
One interesting point is that the TimeSlotContextMenu works just fine.
The definition of the AppointmentContextMenu is:
<AppointmentContextMenus>
<telerik:RadSchedulerContextMenu runat="server" ID="AppointmentContextMenu">
<Items>
<telerik:RadMenuItem Text="Delete" Value="CommandDelete" />
<telerik:RadMenuItem Text="Execution Summary" Value="Summary" />
<telerik:RadMenuItem Text="View Commands" Value="Commands" />
</Items>
</telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>
When the menu is opened, the following code is executed:
function RadScheduler1_AppointmentContextMenu( sender, args )
{
SelectedAppointment = args.get_appointment();
SelectedDate.val( SelectedAppointment.get_start().format( "MM/dd/yyyy" ) );
AppointmentContextMenu.show( args.get_domEvent() );
}
I traced from the last line and the crash happens when the menu tries to show itself.
If you would like to view what is happening, let me know and we can get that set-up.