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

Required vs Optional Resources

1 Answer 100 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 21 May 2010, 02:36 PM
Hello,

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?

Thanks.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 27 May 2010, 11:42 AM
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.

Regards,
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.
Tags
Scheduler
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or