I am trying to add time slot context menu items from server side using business class that returns a List(of). I cannot get the items to display, can someone lend some assistance please?
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu" > |
<Items> |
<telerik:RadMenuItem Text="New Appointment" ImageUrl="Images/new.gif" Value="CommandAddAppointment" /> |
<telerik:RadMenuItem Text="New Recurring Appointment" ImageUrl="Images/recurring.gif" Value="CommandAddRecurringAppointment" /> |
<telerik:RadMenuItem IsSeparator="true" /> |
<%-- Custom command --%> |
<telerik:RadMenuItem Text="Group by Calendar" Value="EnableGrouping" /> |
<telerik:RadMenuItem IsSeparator="true" /> |
<telerik:RadMenuItem Text="Change Scheduler Location" > |
</telerik:RadMenuItem> |
</Items> |
</telerik:RadSchedulerContextMenu> |
Protected Sub LoadLocationSchedulerContextMenuItems() |
Dim objScheduler As New Scheduler |
Dim lLocations As New System.Collections.Generic.List(Of Locations)() |
Dim ChangeSchedulerLocationMenu As RadMenuItem = RadScheduler1.TimeSlotContextMenus(0).Items(4) |
lLocations = objScheduler.GetLocations(m_CTSession.CTContext.OPP.GroupID) |
For Each obj As Locations In lLocations |
Dim LocationMenuItem As New RadMenuItem |
LocationMenuItem.Text = obj.LocationShortName |
LocationMenuItem.Value = obj.LocationId |
ChangeSchedulerLocationMenu.Items.Add(LocationMenuItem) |
Next |
ChangeSchedulerLocationMenu.DataBind() |
objScheduler = Nothing |
lLocations = Nothing |
End Sub |