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

Appointment time slots

3 Answers 158 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dédé
Top achievements
Rank 1
Dédé asked on 27 May 2009, 09:38 AM
Hi,

I would like to create appointment slots to either force user to create their appointment in defined slots, or allow them to create appointment outside of slots with confirmation.
And I would like slots to be rendered as a background area under appointments, with templated rendering...

In the first time, I would like only to have them been rendered as background area...

Do you know if it is possible to do it easily please ?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 27 May 2009, 12:35 PM
Hi Damien,

You can apply custom style to timeslots based on your condition as shown in this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/setting-special-days-or-time-slots-in-radscheduler.aspx

One way to implement the confirmation functionality is to tag timeslots in TimeSlotCreated based on your custom condition using the CssClass property.
protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)  
    {        
        if([MyCondition])  
        {  
            e.TimeSlot.CssClass = "Custom";  
        }         
    } 

Then, you can check which timeslots have been tagged and use confirm as shown below:
function OnClientAppointmentInserting(sender, eventArgs)   
        {             
            if (eventArgs.get_targetSlot().get_domElement().className.match("Custom")!=null)  
            {  
                var answer = confirm("Insert appoinment?")  
                if (answer)   
                {  
                      
                }  
                else   
                {  
                    eventArgs.set_cancel(true);  
                }  
            }  
        } 

I hope this helps you get started.

Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dédé
Top achievements
Rank 1
answered on 27 May 2009, 01:01 PM
That is what I have read in the KB, but by using this I have either to have slot duration multiple of MinutesPerRow, or to have MinutesPerRow set to 1 to fit my needs (about 10k times event is thrown for a full week). And I don't know how I can do custom template rendering (instead of just changind the css class).

Maybe for next version you could add time slot (independent of current time slot functions) with template rendering, and appointment-like data (subject, start, end, id, recurence...) with evolution of client-side functions... And/or add a typed appointment system...

In my case, I have to make a schedule to edit time slots of any duration, so I edit appointments that are stored into slots tables, and in the user scheduler, I have to show the slots under the appointments. User can see them, but are free to take any type of appointment of any duration anywhere in the scheduler. Maybe I should show a confirm window for appointments taken outside of allowed slots...

So what do you think the best is for my case ?

Thanks.
0
Peter
Telerik team
answered on 30 May 2009, 11:43 AM
Hello Damien,

Thank you for your feedback and suggestions. We will consider this case for the future and we might extend RadScheduler's capability to meet your requirements.

Meanwhile, you can refer to this online demo and see if you can use any of the underlying concepts for your scenario:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/resourceavailability/defaultcs.aspx



Sincerely yours,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Dédé
Top achievements
Rank 1
Answers by
Peter
Telerik team
Dédé
Top achievements
Rank 1
Share this question
or