This is a migrated thread and some comments may be shown as answers.

hide an appointment

9 Answers 329 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
debbie f
Top achievements
Rank 1
debbie f asked on 09 Oct 2008, 07:10 PM
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?

9 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 10 Oct 2008, 08:37 AM
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.
0
debbie f
Top achievements
Rank 1
answered on 10 Oct 2008, 03:27 PM
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.
0
T. Tsonev
Telerik team
answered on 11 Oct 2008, 10:19 AM
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
0
Matt
Top achievements
Rank 1
answered on 12 May 2009, 06:11 PM
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
0
Dan
Top achievements
Rank 1
answered on 02 Aug 2011, 05:51 PM
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
0
Dan
Top achievements
Rank 1
answered on 02 Aug 2011, 06:25 PM
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.
0
Neo
Top achievements
Rank 1
answered on 05 Sep 2013, 06:31 PM
There is no e.Appointment in AppointmentDataBoundEventHandler ? Has this been updated since 2008?
0
Plamen
Telerik team
answered on 10 Sep 2013, 12:40 PM
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.
0
Neo
Top achievements
Rank 1
answered on 11 Sep 2013, 03:45 PM
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;  }

Tags
Scheduler
Asked by
debbie f
Top achievements
Rank 1
Answers by
Simon
Telerik team
debbie f
Top achievements
Rank 1
T. Tsonev
Telerik team
Matt
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Neo
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or