RadScheduler -- Restrict to allow more than one entry per day in week view

2 posts, 1 answers
  1. Arima
    Arima avatar
    25 posts
    Member since:
    Mar 2011

    Posted 20 Jan 2015 Link to this post


    I want to restrict user to enter multiple entries per day in week view scheduler. It should be only one entry. It should not create additional row. I am attaching sccreenshot of my requirement in this post. Please guide me to achive this. (I am using Resource group also in this case)
  2. Answer
    Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 22 Jan 2015 Link to this post


    An easy way to restrict user to insert more than one appointment for a day is to use the OnFromCreating event handler:
        1. When you double click on a time slot the RadScheduler FormCreating will be fired.
        2. The e.Appointment will have start and end time of the clicked time slot.
        3. Once you have the appointment start time ( respectively this is the clicked time slot start time) you know for which date user is trying to insert an appointment.
        4. The RadScheduler GetAppointmentsEnclosingRange method retrieve all appointments enclosed in the range.  This way you can check if there are any appointments scheduled for this specific day.
         5. If there are already - you can set e.Cancel = true and prevent showing the advanced from.

    Boyan Dimitrov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top