I have built a scheduler with the telerik controls and everything went alright. But now I want to display appointments with recurrence. I'm able to add an appointment and add recurrence (save to database and databind ok). When I open my saved appointment the scheduler asks me to edit the series or just the current instance (all ok). When I open my appointment i can see that the recurrence is saved alright.
Now my problem has to do with the view of a recurring appointment. The appointment is only displayed on the day that it is created and not on the other(following) days. Now when the day begins it display all the appointments for that day (recurring. Like yesterday added). How can I let them display as long as they are recurring?
Example:
-> add appointment on (25/11).
-> Set recurring to every day
->I only see the appointment on 25/11 and not on 26/11,27/11,28/11,29/11, ...
-> When it gets to 26/11 (the day after) I’m able to see the appointment that I created on 25/11 but I don't see it on 25/11,27/11,28/11,29/11
it's get well stored and it databinds ok (checked with debugging). I can also change the recurring without any problem. I just want to now why it only displays on the today page and not on any other days
<script type="text/javascript"> |
var selectedAppointment = null; |
//Called when the user right-clicks an appointment |
function appointmentContextMenu(sender, eventArgs) { |
var menu = $find("<%= SchedulerAppointmentContextMenu.ClientID %>"); |
selectedAppointment = eventArgs.get_appointment(); |
// menu.show(eventArgs.get_domEvent()); |
} |
//Called when the user clicks an item from the appointment context menu |
function appointmentContextMenuItemClicked(sender, eventArgs) { |
if (!selectedAppointment) |
return; |
var clickedItem = eventArgs.get_item(); |
var scheduler = $find("<%= RadScheduler1.ClientID %>"); |
if (clickedItem.get_parent().get_text) { |
//The user clicked the item corresponding to the "Calendar" resource to which the appointment is assigned |
if (clickedItem.get_imageUrl()) |
return; |
//Clear all resources |
selectedAppointment.get_resources().clear(); |
//Find the resource corresponding to the clicked item |
var calendar = scheduler.get_resources().getResourceByTypeAndKey("Calendar", clickedItem.get_value()); |
//Add it to the appointment resources collection |
selectedAppointment.get_resources().add(calendar); |
//Update the appointment |
scheduler.updateAppointment(selectedAppointment); |
} |
} |
function Export(sender, e) |
{ |
$find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, ""); |
} |
</script> |
</telerik:RadScriptBlock> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadScheduler1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<telerik:RadScheduler runat="server" style="z-index:1000" ID="RadScheduler1" SelectedDate="2009-06-04" FirstDayOfWeek="Monday" |
LastDayOfWeek="Sunday" OnClientAppointmentContextMenu="appointmentContextMenu" |
DataKeyField="ID" DataSubjectField="Subject" Height="375px" |
DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule" |
DataRecurrenceParentKeyField="RecurrenceParentID" AllowDelete="false" |
OnClientAppointmentContextMenuItemClicked="appointmentContextMenuItemClicked" |
Skin="Default" StartInsertingInAdvancedForm="True" ShowFullTime="True" EditFormTimeFormat="HH:mm" HoursPanelTimeFormat="HH:mm" MinimumInlineFormHeight="35" DataDescriptionField="Description" EnableDescriptionField="True" CustomAttributeNames="FileType,DownloadLink,Owner" DayEndTime="1.00:00:00" DayStartTime="00:00:00" WorkDayEndTime="00:00:00" WorkDayStartTime="00:00:00" Culture="(Default)"> |
<AppointmentTemplate> |
<u><font size="large"><%#Eval("FileType")%>:</font></u> <b><%# Eval("Subject") %></b><%#Eval("DownloadLink")%> |
<div style="text-align: right;"><asp:Button runat="server" ID="btnExport" CssClass="rsExportButton" ToolTip="Export to iCalendar" Style="cursor: pointer;cursor: hand;" CommandName="Export" OnClientClick="Export(this, event); return false;" /></div> |
<div> <%# Eval("Description") %></div> |
</AppointmentTemplate> |
<AppointmentContextMenus> |
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu"> |
<Items> |
<telerik:RadMenuItem Text="Open" Value="CommandEdit" runat="server" /> |
<telerik:RadMenuItem IsSeparator="True" runat="server" /> |
<telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="~/Images/delete.gif" runat="server" /> |
</Items> |
</telerik:RadSchedulerContextMenu> |
</AppointmentContextMenus> |
<TimeSlotContextMenus> |
<telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu"> |
<Items> |
<telerik:RadMenuItem Text="New Appointment" ImageUrl="~/Images/calendar.png" Value="CommandAddAppointment" runat="server" /> |
</Items> |
</telerik:RadSchedulerContextMenu> |
</TimeSlotContextMenus> |
<AdvancedForm TimeFormat="HH:mm" /> |
<MultiDayView DayEndTime="10:00:00" DayStartTime="00:00:00" /> |
<DayView DayEndTime="1.00:00:00" DayStartTime="00:00:00" /> |
</telerik:RadScheduler> |