I would like to customize the monthview to different a different data than the dayview;
for that i tweaked the Appointment template and the AppointmentCreated event.
My problem is that the month view only shows one line, the title or header of the view and nothing more.
This behavior also messes with the pdf printing as what gets printed is what im seeing on the screen (maybe you should implement a PDFTemplate?)
Here are images of the DayView and the MonthView
Is it possible to have MonthView show what DayView shows?
Or alternatively, is it possible to print a custom set of Appointment fields, different than whats shown on MonthView? (I want to enable printing or pdf exporting on monthview but im having this display issue)
My markup:
My AppointmentCreated :
Also, i had to re-implement recurrence because i couldnt find a good and complete tutorial on how to work with a RecurrenceEditor with templates as im doing.
for that i tweaked the Appointment template and the AppointmentCreated event.
My problem is that the month view only shows one line, the title or header of the view and nothing more.
This behavior also messes with the pdf printing as what gets printed is what im seeing on the screen (maybe you should implement a PDFTemplate?)
Here are images of the DayView and the MonthView
Is it possible to have MonthView show what DayView shows?
Or alternatively, is it possible to print a custom set of Appointment fields, different than whats shown on MonthView? (I want to enable printing or pdf exporting on monthview but im having this display issue)
My markup:
<tk:RadScheduler ID="sched" runat="server" AppointmentStyleMode="Default" DayEndTime="19:00:00" AllowInsert="true" AllowEdit="true" AllowDelete="true"<br> EnableDescriptionField="True" FirstDayOfWeek="Monday" LastDayOfWeek="Friday"<br> ShowNavigationPane="true" ShowFooter="true" StartEditingInAdvancedForm="true"<br> StartInsertingInAdvancedForm="true" Height="551px"<br> OnFormCreated="sched_FormCreated"<br> OverflowBehavior="Expand" <br> OnAppointmentCommand="sched_AppointmentCommand"<br> OnAppointmentCreated="sched_AppointmentCreated"<br> OnAppointmentDataBound="sched_AppointmentDataBound"<br> OnAppointmentDelete="sched_AppointmentDelete"<br> Skin="Web20"><br> <MonthView AdaptiveRowHeight="true" /><br> <AdvancedForm Modal="true" /><br> <ExportSettings OpenInNewWindow="true" FileName="Scheduler"><br> <Pdf PageTitle="Calendário" Author="CRA" Creator="CRA" Title="Calendário"></Pdf><br> </ExportSettings><br> <TimelineView UserSelectable="false" /><br> <AppointmentContextMenuSettings EnableDefault="true" /><br> <TimeSlotContextMenuSettings EnableDefault="true" /><br> <TimeSlotContextMenus><br> <tk:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server"><br> <Items><br> <tk:RadMenuItem Text="New Appointment" Value="CommandAddAppointment" /><br> </Items><br> </tk:RadSchedulerContextMenu><br> </TimeSlotContextMenus><br> <AppointmentContextMenus><br> <tk:RadSchedulerContextMenu runat="server" ID="ContextMenu1"><br> <Items><br> <%--<tk:RadMenuItem Text="Ir para dia" Value="CommandNavigateDay" />--%><br> <tk:RadMenuItem Text="Editar" Value="CommandEdit" /><br> <tk:RadMenuItem Text="Apagar" Value="CommandDelete" /><br> <%--<tk:RadMenuItem Text="Exportar Para PPF" Value="CommandExport"></tk:RadMenuItem>--%><br> </Items><br> </tk:RadSchedulerContextMenu><br> </AppointmentContextMenus><br> <AppointmentTemplate><br> <asp:Image runat="server" ID="imgRepeat" AlternateText="Repeat" ImageUrl="~/images/repeat.png" Width="15" Height="15" Visible="false"/><br> <asp:Label runat="server" ID="lblHeader" Font-Bold="true" /><br> <hr /><br> <table border="0"><br> <tr><br> <td style="border-color: transparent;"><span style="font-weight: bold;">Descricao: </span></td><br> <td style="border-color: transparent;"><br> <asp:Label ID="lblDescription" runat="server" /></td><br> </tr><br> <tr><br> <td style="border-color: transparent;"><span style="font-weight: bold;">Participantes: </span></td><br> <td style="border-color: transparent;"><br> <asp:Label ID="lblParticipants" runat="server" /></td><br> </tr><br> <tr><br> <td style="border-color: transparent;"><span style="font-weight: bold;">Duracao: </span></td><br> <td style="border-color: transparent;"><br> <asp:Label ID="lblDates" runat="server" /></td><br> </tr><br> <tr><br> <td style="border-color: transparent;"><span style="font-weight: bold;">Local: </span></td><br> <td style="border-color: transparent;"><br> <asp:Label ID="lblLocale" runat="server" /></td><br> </tr><br> </table><br> </AppointmentTemplate><br> </tk:RadScheduler><br><div></div>My AppointmentCreated :
<div> protected void sched_AppointmentCreated(object sender, AppointmentCreatedEventArgs e) {<br><br> using (DBFactory link = new DBFactory()) {<br> int evtID = int.Parse(e.Appointment.ID.ToString());<br> if (evtID == 0) {<br> evtID = SessionManager.Instance.LastInsertedCalendarEventID;<br> }<br> CalendarEvent ce = link.GetCalendarEvent(evtID);<br><br> Label lblHeader = (Label)e.Container.FindControl("lblHeader");<br> Label lblDescription = (Label)e.Container.FindControl("lblDescription");<br> Label lbldates = (Label)e.Container.FindControl("lbldates");<br> Label lblParticipants = (Label)e.Container.FindControl("lblParticipants");<br> Label lblLocale = (Label)e.Container.FindControl("lbllocale");<br> Image imgRepeat = (Image)e.Container.FindControl("imgRepeat");<br> if (ce.RecurrenceType == "I") {<br> imgRepeat.Visible = true;<br> }<br> lblLocale.Text = string.Format("{0}", ce.EventLocation1.Location);<br> lblHeader.Text = string.Format("{0} - {1} ", ce.EventType1.EventTypeName, ce.Subject);<br> lblDescription.Text = string.Format("{0}", ce.Description);<br> lbldates.Text = string.Format("{0:hh:mm}h - {1:hh:mm}h", ce.StartDate, ce.EndDate);<br> lblParticipants.Text = string.Format("{0}", link.GetUsernamesFromEvent(evtID));<br><br> }<br> }<br></div>Also, i had to re-implement recurrence because i couldnt find a good and complete tutorial on how to work with a RecurrenceEditor with templates as im doing.
