RadScheduler Appointment dynamic display

4 posts, 1 answers
  1. TB
    TB avatar
    23 posts
    Member since:
    Jun 2010

    Posted 28 Jan 2014 Link to this post

    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.
                      




  2. TB
    TB avatar
    23 posts
    Member since:
    Jun 2010

    Posted 31 Jan 2014 Link to this post

    Is what I asked possible and if so how? Please help.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Plamen
    Admin
    Plamen avatar
    2731 posts

    Posted 31 Jan 2014 Link to this post

    Hello,

    You can use AppointmentCreated event for this and hide some of the controls in the particular appointment container.

    Hope this will help you solve the issue.

    Regards,
    Plamen
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  5. TB
    TB avatar
    23 posts
    Member since:
    Jun 2010

    Posted 31 Jan 2014 Link to this post

    thanks. It solved my problem.
Back to Top