Display Recurrence and Reminder symbols

9 posts, 1 answers
  1. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 30 Sep 2011 Link to this post

    I am wondering if there is a way to display recurrence and reminder icons when using custom Appointment Templates? Thanks
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 04 Oct 2011 Link to this post

    Hello Ilya,

    The following help article might help: RadScheduler: Customizing the AdvancedForm: Using Custom Templates.

    The code library at the link bellow might be of help too: Customize the Advanced Form With the Advanced Template User Controls.

    Best wishes,
    Ivana
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 04 Oct 2011 Link to this post

    Ivana,

    I am actually interested in custom Appointment Templates, not AsdvancedEdit(Insert) templates. The reason is because the scheduler does not currently support iPad we are using a custom Appointment Template to display a hyperlink which opens up an AdvancedEdit form. Our custom Appointment Template looks like this:

    <AppointmentTemplate>
        <div class="rsCustomAppointmentContainer">
        <a href="#" onclick="EditAppointment(event)"><%# Eval("Subject") %></a><br />
        </div>
        </AppointmentTemplate>

    If would not be using a custom Appointment Template we would be shown standard appointments with Reminder and Recurrence symbols. But in case of custom templates these symbols are not displayed. We could use our own images but I wanted to find out if we could display the scheduler's built-in symbols for Reminders and Recurrent appointments with Appointment Templates. Thanks
  4. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 07 Oct 2011 Link to this post

    Hello Ilya,

    You could achieve the desired scenario only by adding the appropriate CSS classes to the div element inside the <AppointmentTemplate> element.
    To show a recurring appointment you could add the .rsAptRecurrence CSS class to the div element as in the code snippet bellow:
    <AppointmentTemplate>
          <div class="rsAptRecurrence">
                        <a href="#" onclick="EditAppointment(event)" style="padding: 0 0 0 30px;">
                            <%# Eval("Subject") %></a><br />
           </div>
    </
    AppointmentTemplate>

    To achieve the scenario of appointments with reminder, you could do the following:

    <AppointmentTemplate>
      <div class="rsAptReminder">
               .....
            </div>
    </AppointmentTemplate>

    Hope this helps.

    Regards,
    Ivana
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
  5. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 07 Oct 2011 Link to this post

    It looks like in this scenario the recurrence symbol is always displayed even if the appointment is non-recurrent. Same issue with reminders, the symbol is displayed even if the appointment does not have a reminder. Is there a way to add AppointmentTemplate in the code-behind? I did not see AppointmentTemplate class so I am assuming it is not possible. Please clarify. And also what about if I want to show both symbols, when appointment is both recurring and has a reminder.
  6. Answer
    Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 07 Oct 2011 Link to this post

    Hello Ilya,

    It also could be done from code-behind in the OnAppointmentCreated event.
    Ex:
    protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
    {
        Panel recurrenceStateDiv = new Panel();
        recurrenceStateDiv.CssClass = "rsAptRecurrence"; //"rsAptReminder"
        e.Container.Controls.AddAt(0, recurrenceStateDiv);
    }

    The example above could be found at the following demo at our website: RadSchduler: First Look.

    Hope it helps.

    Greetings,
    Ivana
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
  7. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 07 Oct 2011 Link to this post

    Ok thanks. That was it
  8. Jill-Connie Lorentsen
    Jill-Connie Lorentsen avatar
    118 posts
    Member since:
    Nov 2008

    Posted 02 May 2013 Link to this post

    And what if the e.Appointment.RecurrenceState == RecurrenceState.Exception and I want to display the circle with a line crossed over it? What is the CssClass in this case?

    Regards, Jill-Connie Lorentsen
  9. Plamen
    Admin
    Plamen avatar
    3080 posts

    Posted 03 May 2013 Link to this post

    Hello Jill,

    Here is the code that should work for you:
    protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
             {
                  if (e.Appointment.RecurrenceState == RecurrenceState.Master || e.Appointment.RecurrenceState == RecurrenceState.Occurrence)
                  {
                       Panel recurrenceStateDiv = new Panel();
                       recurrenceStateDiv.CssClass = "rsAptRecurrence";
                       e.Container.Controls.AddAt(0, recurrenceStateDiv);
                  }
     
                  if (e.Appointment.RecurrenceState == RecurrenceState.Exception)
                  {
                       Panel recurrenceStateDiv = new Panel();
                       recurrenceStateDiv.CssClass = "rsAptRecurrenceException";
                       e.Container.Controls.AddAt(0, recurrenceStateDiv);
                  }
             }

    You can can check how it works in this on-line demo for example. 


    Greetings,
    Plamen
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top