I have a scheduler in my asp page. When the appointments are displayed I want to display for some appointments all my items in the AppointmentTemplate and in others only the appointment subject? Can it be done?
My code is:
<telerik:RadScheduler ID="SchProgramariEchipament" runat="server" DataDescriptionField="DESCRIERE"
DataEndField="DATA_END" DataKeyField="ID" DataSourceID="dsProgramareEchipament" DataStartField="DATA_START"
DataSubjectField="SUBIECT" Skin="Windows7" StartInsertingInAdvancedForm="True" OnAppointmentCancelingEdit="SchProgramariEchipament_AppointmentCancelingEdit"
AppointmentStyleMode="Default" OnAppointmentInsert="SchProgramariEchipament_AppointmentInsert"
OnAppointmentUpdate="SchProgramariEchipament_AppointmentUpdate" OnAppointmentDelete="SchProgramariEchipament_AppointmentDelete"
OnAppointmentDataBound="SchProgramariEchipament_AppointmentDataBound" OnFormCreated="SchProgramariEchipament_FormCreated"
EditFormDateFormat="dd/MM/yyyy" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableExactTimeRendering="true"
CustomAttributeNames="id_aparatura" OverflowBehavior="Auto">
<Localization AdvancedNewAppointment="Programare Echipament Nou" AdvancedSubject="Subiect"
ConfirmDeleteText="Vrei sa stergeti programarea?" ConfirmDeleteTitle="Vreti sa stergeti programarea?"
ConfirmOK="Da" ConfirmCancel="Nu"
HeaderDay="Zi" HeaderMonth="Luna" HeaderToday="Azi" HeaderWeek="Saptamana" Save="Salvare"
Cancel="Anuleaza" Show24Hours="24 ore..." ShowBusinessHours="Perioada de Serviciu" />
<AdvancedForm Modal="false"></AdvancedForm>
<AdvancedForm DateFormat="dd/MM/yyyy" />
<ExportSettings OpenInNewWindow="True">
</ExportSettings>
<ResourceTypes>
<telerik:ResourceType KeyField="id_sala" Name="Sala" TextField="nume"
ForeignKeyField="id_sala" DataSourceID="dsSala" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Operatie" TextField="denumire"
ForeignKeyField="ID_OPERATIE" DataSourceID="dsOperatie" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Protocol" TextField="nume_protocol" ForeignKeyField="ID_OPERATIE"
DataSourceID="dsProtocol" AllowMultipleValues="false" >
</telerik:ResourceType>
</ResourceTypes>
<ResourceStyles>
</ResourceStyles>
<AppointmentTemplate>
<div style="font-style: italic; width:100%">
Subiect:
<%# Eval("Subject") %></div>
<div style="font-style: italic; width:100%">
Sala Operatie:
<%# Eval("Sala.Text")%></div>
<div style="font-style: italic; width:100%">
Operatie:
<%# Eval("Operatie.Text")%></div>
</AppointmentTemplate>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
<asp:SqlDataSource ID="dsProgramareEchipament" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM PROGRAMARE_ECHIPAMENT WHERE ID=:original_ID" OldValuesParameterFormatString="original_{0}"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT ID,ID_ECHIPAMENT,SUBIECT,DESCRIERE,DATA_START,DATA_END,E_PERIOADA_STERILIZARE,ID_OPERATIE,ID_SALA FROM PROGRAMARE_ECHIPAMENT where ID_ECHIPAMENT=:ID_ECHIPAMENT"
OnSelecting="dsProgramareEchipament_OnSelecting">
<DeleteParameters>
<asp:Parameter Name="original_ID" Type="Decimal" />
</DeleteParameters>
<SelectParameters>
<asp:Parameter Name="ID_ECHIPAMENT" Type="Decimal" />
</SelectParameters>
</asp:SqlDataSource> So for some appointments I want to display Subiect/Sala Operatie/Operatie and from others I want to only display only Subject. The condition that tells me what type of appointment is from a result of storedprocedure called from code behind. Please help me. Thanks.
My code is:
<telerik:RadScheduler ID="SchProgramariEchipament" runat="server" DataDescriptionField="DESCRIERE"
DataEndField="DATA_END" DataKeyField="ID" DataSourceID="dsProgramareEchipament" DataStartField="DATA_START"
DataSubjectField="SUBIECT" Skin="Windows7" StartInsertingInAdvancedForm="True" OnAppointmentCancelingEdit="SchProgramariEchipament_AppointmentCancelingEdit"
AppointmentStyleMode="Default" OnAppointmentInsert="SchProgramariEchipament_AppointmentInsert"
OnAppointmentUpdate="SchProgramariEchipament_AppointmentUpdate" OnAppointmentDelete="SchProgramariEchipament_AppointmentDelete"
OnAppointmentDataBound="SchProgramariEchipament_AppointmentDataBound" OnFormCreated="SchProgramariEchipament_FormCreated"
EditFormDateFormat="dd/MM/yyyy" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" EnableExactTimeRendering="true"
CustomAttributeNames="id_aparatura" OverflowBehavior="Auto">
<Localization AdvancedNewAppointment="Programare Echipament Nou" AdvancedSubject="Subiect"
ConfirmDeleteText="Vrei sa stergeti programarea?" ConfirmDeleteTitle="Vreti sa stergeti programarea?"
ConfirmOK="Da" ConfirmCancel="Nu"
HeaderDay="Zi" HeaderMonth="Luna" HeaderToday="Azi" HeaderWeek="Saptamana" Save="Salvare"
Cancel="Anuleaza" Show24Hours="24 ore..." ShowBusinessHours="Perioada de Serviciu" />
<AdvancedForm Modal="false"></AdvancedForm>
<AdvancedForm DateFormat="dd/MM/yyyy" />
<ExportSettings OpenInNewWindow="True">
</ExportSettings>
<ResourceTypes>
<telerik:ResourceType KeyField="id_sala" Name="Sala" TextField="nume"
ForeignKeyField="id_sala" DataSourceID="dsSala" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Operatie" TextField="denumire"
ForeignKeyField="ID_OPERATIE" DataSourceID="dsOperatie" AllowMultipleValues="false">
</telerik:ResourceType>
<telerik:ResourceType KeyField="ID_OPERATIE" Name="Protocol" TextField="nume_protocol" ForeignKeyField="ID_OPERATIE"
DataSourceID="dsProtocol" AllowMultipleValues="false" >
</telerik:ResourceType>
</ResourceTypes>
<ResourceStyles>
</ResourceStyles>
<AppointmentTemplate>
<div style="font-style: italic; width:100%">
Subiect:
<%# Eval("Subject") %></div>
<div style="font-style: italic; width:100%">
Sala Operatie:
<%# Eval("Sala.Text")%></div>
<div style="font-style: italic; width:100%">
Operatie:
<%# Eval("Operatie.Text")%></div>
</AppointmentTemplate>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
<asp:SqlDataSource ID="dsProgramareEchipament" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM PROGRAMARE_ECHIPAMENT WHERE ID=:original_ID" OldValuesParameterFormatString="original_{0}"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT ID,ID_ECHIPAMENT,SUBIECT,DESCRIERE,DATA_START,DATA_END,E_PERIOADA_STERILIZARE,ID_OPERATIE,ID_SALA FROM PROGRAMARE_ECHIPAMENT where ID_ECHIPAMENT=:ID_ECHIPAMENT"
OnSelecting="dsProgramareEchipament_OnSelecting">
<DeleteParameters>
<asp:Parameter Name="original_ID" Type="Decimal" />
</DeleteParameters>
<SelectParameters>
<asp:Parameter Name="ID_ECHIPAMENT" Type="Decimal" />
</SelectParameters>
</asp:SqlDataSource> So for some appointments I want to display Subiect/Sala Operatie/Operatie and from others I want to only display only Subject. The condition that tells me what type of appointment is from a result of storedprocedure called from code behind. Please help me. Thanks.