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

radscheduler specific Timeslot disabling after the appointmnets are loaded

5 Answers 218 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Arvind
Top achievements
Rank 1
Arvind asked on 09 Jun 2012, 12:31 PM

Hi,

I am using the scheduler control for a project, and I am quite new to it, your guidance on below 3 problems would be very helpful.

I have a list of free time, and time booked for appointment etc. Now based on this the remaining timeslots should be disabled. 
i.e. for example if for today I have my time available from say 9:00 AM to 10:00AM then an appointment from 10:00AM to 12:AM and then a available time from 12:PM to 3:00PM . except for these time the remaining timeslots should be disabled. How can I achieve this.

I am loading the appointment from the server side, hence using the TimeSlotCreated event I was not able to change the timeslots.

Also if you can help me on how to add a tooltip to the available timeslots(in the above example 9:00AM to 10:00AM, I have to show a tool tip as say "available from 9:00AM - 10:00AM".

 

Third how can I clear a scheduler, say today I have data in scheduler horizontally 3 users in header and each having some appointment, when I move to next day if there are no users and no appointment, I want to clear the scheduler so that the old data is removed. I Tried to clear using below code, but still the see that the header and appointment persist.

DiarySchedule.ResourceTypes.Clear();
Appointments.Clear();
DiarySchedule.DataKeyField = "ID";
DiarySchedule.DataStartField = "Start";
DiarySchedule.DataEndField = "End";
DiarySchedule.DataSubjectField = "Subject";
DiarySchedule.DataDescriptionField = "Description";
DiarySchedule.DataRecurrenceField = "RecurrenceRule";
DiarySchedule.DataRecurrenceParentKeyField = "RecurrenceParentID";
DiarySchedule.DataSource = Appointments;


Thank you

Arvind

 

5 Answers, 1 is accepted

Sort by
0
Arvind
Top achievements
Rank 1
answered on 11 Jun 2012, 11:37 AM
Any help on this please.

Thanks

Arvind
0
Peter
Telerik team
answered on 11 Jun 2012, 04:02 PM
Hello Arvind,

1. Please, take a look at this demo - Customizing the Time Slots

2. You can set the tooltip for the time slots like this:
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
   {
 
       e.TimeSlot.Control.ToolTip = "available from " + e.TimeSlot.Start.ToShortTimeString() + " - " + e.TimeSlot.End.ToShortTimeString();
        
   }

3. This functionality is not supported.

Feel free to contact us if you have any other questions.

Regards,
Peter
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.
0
Arvind
Top achievements
Rank 1
answered on 12 Jun 2012, 02:12 PM
Hi,

Thank you for the reply.
Is there no way to clear a scheduler, i have to load the scheduler for different users, but if some user does not have any appointment the old data is not cleared.
Also is there any way i can control the width of the appointment control.

Thanks.
0
Peter
Telerik team
answered on 15 Jun 2012, 12:08 PM
Hello Arvind,

I am not sure I understand your first question. Could you please view this demo and let me know if this is what you are looking for?

As for the second question, the width of the appointment will depend on the width of the time slot it is scheduled for. The latter can be controlled with the ColumnWidth property.


All the best, Peter
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.
0
Ibrahim
Top achievements
Rank 1
answered on 11 Apr 2016, 11:50 AM

Regarding clearing the appointments just add below line of code, it's work for me.

RadScheduler1.Appointments.Clear();

Tags
Scheduler
Asked by
Arvind
Top achievements
Rank 1
Answers by
Arvind
Top achievements
Rank 1
Peter
Telerik team
Ibrahim
Top achievements
Rank 1
Share this question
or