This is a migrated thread and some comments may be shown as answers.

Context Menus when Scheduler is in RadAjaxPanel

1 Answer 65 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Matthew Botting
Top achievements
Rank 1
Matthew Botting asked on 03 Jul 2013, 05:29 AM
Hi
I have a RadScheduler sitting within a RadAjaxPanel.
It is binding using a provider that I have written inheriting from DbSchedulerProviderBase
It all works pretty well except I am having the issue that when I switch from business hours view to 24 hour view via the context menu the context menu does not update to "show business hours" it still says "show 24 hours...".
I believe that I have traced the issue to the DOM. The RadContextMenu sits right at the top of my form and outside of the AjaxPanel.
Yes I can and will probably have to override the OnClientTimeSlotContextMenu function and change the text myself based upon the current status. However this appears to be a bug. In a future update can this menu be moved to immediately before, after or inside the schedule DOM element?
<telerik:RadAjaxPanel runat="server" ID="pnlSchedule"
    EnableAJAX="true">
    <telerik:RadScheduler runat="server" id="radSch">
  

<AppointmentContextMenuSettings EnableDefault="True" />

<TimeSlotContextMenuSettings EnableDefault="True" />

  
</telerik:RadScheduler>
</telerik:RadAjaxPanel>

1 Answer, 1 is accepted

Sort by
0
Matthew Botting
Top achievements
Rank 1
answered on 03 Jul 2013, 05:44 AM
Added below code to override and fix.
function OnClientTimeSlotContextMenu(sender, args) {
    if (sender.get_showFullTime())
        sender.get_timeSlotContextMenus()[0].get_items().getItem(3).set_text("Show business hours...");
    else
        sender.get_timeSlotContextMenus()[0].get_items().getItem(3).set_text("Show 24 hours...");
}
Tags
Scheduler
Asked by
Matthew Botting
Top achievements
Rank 1
Answers by
Matthew Botting
Top achievements
Rank 1
Share this question
or