hide an appointment

10 posts, 0 answers
  1. debbie f
    debbie f avatar
    36 posts
    Member since:
    Feb 2006

    Posted 09 Oct 2008 Link to this post

    Is there any possible way to actually hide an appointment on radscheduler?  I am implementing the OnAppointmentCreated event & setting e.Appointment.Visible = false.  I've also tried setting the Container and Container.Parent visibility to false but I still get an empty appointment box drawn on the date.

    I need the information of the appointment itself to handle the event OnTimeSlotCreated in which I had an html control to the container depending on the appointment properties.  But I do not want the appointment itself to be visible on the scheduler. 

    Is there any way to achieve this?
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 10 Oct 2008 Link to this post

    Hello debbie f,

    Toggling the visibility of an Appointment in the AppointmentCreated event handler will not work as there the Appointment is already 'rendered'.

    Try setting e.Appointment.Visible to false in the AppointmentDataBound event handler.

    Best wishes,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. debbie f
    debbie f avatar
    36 posts
    Member since:
    Feb 2006

    Posted 10 Oct 2008 Link to this post

    Well, it seems that if I set the visibility during DataBound, that actually removes the appointment from the TimeSlot.Appointments list object during OnTimeSlotCreated event.  Is that correct behavior - that the visibility of the appointment during databinding will determine whether it is in the TimeSlot.Appointments list?

    I need to the appointment information for logic that is necessary during OnTimeSlotCreated event.
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 11 Oct 2008 Link to this post

    Hello Debbie,

    Yes, that is correct, RadScheduler will discard the appointment from the layout if it is invisible. We can probably work out a CSS that will allow you to hide it completely, but there is another problem. The appointment will still be included in the layout and it might affect the size of other appointments, as the scheduler will try to allocate space for it.

    My suggestion is to hide the appointment in AppointmentDataBound and to use the RadScheduler API to obtain the information you need - for example RadScheduler.Appointments.GetAppointmentsInRange(), GetAppointmentsStartingInRange, etc.

    Regards,
    Tsvetomir Tsonev
  6. Matt
    Matt avatar
    66 posts
    Member since:
    Apr 2009

    Posted 12 May 2009 Link to this post

    Is there a quick way to show/hide appointments based on a resource?  ie, show only personal appts and hide all others.

    ---EDIT:  Never mind...just found the Scheduler/defining resource demo
  7. Dan
    Dan avatar
    32 posts
    Member since:
    Feb 2010

    Posted 02 Aug 2011 Link to this post

    Any update on how to hide the appointment with CSS? That would work for me. I still need the appointment to be bound as mentioned in the original post above. Just need it hidden completely.

    Thanks,
    Dan
  8. Dan
    Dan avatar
    32 posts
    Member since:
    Feb 2010

    Posted 02 Aug 2011 Link to this post

    I did it in AppointmentDataBound and I still was able to run what I needed in TimeSlotCreated. Perhaps this was an issue with an older release.
  9. Neo
    Neo avatar
    30 posts
    Member since:
    May 2009

    Posted 05 Sep 2013 Link to this post

    There is no e.Appointment in AppointmentDataBoundEventHandler ? Has this been updated since 2008?
  10. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 10 Sep 2013 Link to this post

    Hello,

     
    You can refer top this on-line demos where is shown how appointments can be hidden in the AppointmentDataBound event depending on their resource.

    Hope this will be helpful.

    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 RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  11. Neo
    Neo avatar
    30 posts
    Member since:
    May 2009

    Posted 11 Sep 2013 Link to this post

    I found AppointmentDataBound was slowing down my processing so I did it with the rest of my logic in AppointmentCreated + CSS

    e.Appointment.CssClass = "HideAppointment";

    .HideAppointment{   display:none;  }

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017