Required vs Optional Resources

2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 21 May 2010 Link to this post


    With resources, is it possible to have some of the resources required and some optional?  What I mean is can the Scheduler do the validation, like it does for the subject message?

  2. T. Tsonev
    T. Tsonev avatar
    2760 posts

    Posted 27 May 2010 Link to this post

    Hi Brian,

    You can do simple validation using the AppointmentInsert/AppointmentUpdate events. Cancelling them will abort the operation and return the user to the form:

    protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
        if (e.Appointment.Resources.GetResourceByType("Calendar") == null)
            e.Cancel = true;

    You can use ScriptManager.RegisterStartupScript to show the user a message about what went wrong. More elegant validation can be done using the advanced template.

    I hope this helps.

    Tsvetomir Tsonev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
Back to Top