Appointment time slots

4 posts, 0 answers
  1. Dédé
    Dédé avatar
    60 posts
    Member since:
    May 2009

    Posted 27 May 2009 Link to this post

    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 ?
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 27 May 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dédé
    Dédé avatar
    60 posts
    Member since:
    May 2009

    Posted 27 May 2009 Link to this post

    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.
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 30 May 2009 Link to this post

    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.
Back to Top