We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Appointments with multiple resources

Thread ID:





132807 Sep 22,2017 06:28 AM UTC Jun 21,2018 01:14 PM UTC ASP.NET Web Forms 3
Tags: Schedule
James Osborne
Asked On September 22, 2017 06:28 AM UTC

Is it possible to assign an appointment to multiple resources, and if so how is that possible, i've tried leaving the resource id blank and comma separated on my objects and neither currently displays on the resources?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On September 22, 2017 07:24 AM UTC

Thank you for contacting Syncfusion support. 
Yes, it is possible to assign multiple resources for a single appointment and for the same we have prepared the below sample for your reference. In the sample db, Meeting appointment will be assigned to 3 resources and it will render in Schedule as shown below. Kindly view the below video demo which will demonstrate the single appointment creation for multiple resources and for this scenario AllowMultiple field should be set to true. 
<ej:Schedule ID="Schedule1" ClientIDMode="Static" Height="525px" Width="100%" CurrentDate="5/5/2014" runat="server" DataSourceID="SqlDataSource1">    
    <Group Resources="Owners"/> 
    <ej:Resources Field="OwnerId" Name="Owners" Title="Owner" AllowMultiple="true"> 
        <ResourceSettings Color="color" Id="id" Text="text"></ResourceSettings> 
     <AppointmentSettings ApplyTimeOffset="false" Id="Id" Subject="Subject" AllDay="AllDay" StartTime="StartTime" EndTime="EndTime" Recurrence="Recurrence" RecurrenceRule="RecurrenceRule" ResourceFields="OwnerId"/> 
Note: Even though single appointment is created for 3 resources, db will store the appointment for each resource separately as showm above. 

Frederik Gysel
Replied On June 20, 2018 11:59 AM UTC


How is the INSERT statement executed 3 times when working with CRUD?

Thank you

Velmurugan S [Syncfusion]
Replied On June 21, 2018 01:14 PM UTC

Hi Frederik, 
We would like to inform you that, we need to implement a loop to save/insert the created single appointment for multiple resources in the data base table. For example, if you are assigning an appointment for 3 resources, Scheduler will create and send 3 appointment object to the Server Side control method and within that method (ex: CrudResult) we need to include one for loop and save all the three appointment objects in database. Please refer to the following code example to save singe appointment for multiple resources. 
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
        public static List<ScheduleAppointment> CrudResult(List<ScheduleAppointment> added, List<ScheduleAppointment> changed, List<ScheduleAppointment> deleted) 
            ScheduleDataDataContext db = new ScheduleDataDataContext(); 
            int intMax = db.ScheduleAppointments.ToList().Count > 0 ? db.ScheduleAppointments.ToList().Max(p => p.Id) : 0; 
            if (added != null && added.Count > 0) 
                for (int i = 0; i < added.Count; i++) 
                    intMax = db.ScheduleAppointments.ToList().Count > 0 ? db.ScheduleAppointments.ToList().Max(p => p.Id) : 0; 
                    var value = added[i]; 
                    DateTime startTime = Convert.ToDateTime(value.StartTime); 
                    DateTime endTime = Convert.ToDateTime(value.EndTime); 
                    ScheduleAppointment appoint = new ScheduleAppointment(); 
                    appoint.Id = intMax + 1; 
                    appoint.Subject = value.Subject; 
                    appoint.StartTime = startTime; 
                    appoint.EndTime = endTime; 
                    appoint.AllDay = value.AllDay; 
                    appoint.Recurrence = value.Recurrence; 
                    appoint.RecurrenceRule = value.RecurrenceRule; 
                    appoint.OwnerId = value.OwnerId; 
           return db.ScheduleAppointments.ToList(); 
We have prepared the Schedule CRUD sample with the above code example and using local database, which can be downloaded from the following location. 
Kindly try with the above sample and let us know if you need any further assistance on this. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon