Drag and drop grouped resources - console error attached

Hi,

We're trying to use the scheduler with grouped resources but we can't get drag and drop to work as there is an error in the console.  Do you have a sample of drag and drop working with grouped resources? 

This is our setup, we have a list of grouped resources (tables)



But we get this error in the console.



Thanks,

Alex


4 Replies

AL Alex August 9, 2021 08:42 AM UTC

Actually, think we can see the issue - if we try and use a collection or an array to link resources to an event for example a meeting that will have 2 meeting rooms as in the attached file we g


Attachment: Test_b906fd1d.zip


NR Nevitha Ravi Syncfusion Team August 9, 2021 09:06 AM UTC

Hi Alex, 

Greetings from Syncfusion Support. 

We have checked your shared code snippets and let you know that you should not use integer array unless you have group editing feature. Since you have used integer array for RoomId, drag and drop not works properly. Please try the below code snippets. 

    List<AppointmentData> DataSource = new List<AppointmentData> 
{ 
        new AppointmentData { Id = 1, Subject = "Meeting", StartTime = new DateTime(2020, 1, 31, 9, 30, 0) , EndTime = new DateTime(2020, 1, 31, 11, 0, 0), 
         OwnerId = 1, RoomId = 1 , HotelId = 1 } 
    }; 
    public class AppointmentData 
    { 
        public int Id { get; set; } 
        public string Subject { get; set; } 
        public string Location { get; set; } 
        public DateTime StartTime { get; set; } 
        public DateTime EndTime { get; set; } 
        public string Description { get; set; } 
        public bool IsAllDay { get; set; } 
        public string RecurrenceRule { get; set; } 
        public string RecurrenceException { get; set; } 
        public Nullable<int> RecurrenceID { get; set; } 
        public int OwnerId { get; set; } 
        public int RoomId { get; set; } 
        public int HotelId { get; set; } 
    } 

If you want to create multiple appointments through editor window, you need to set AllowMultiple to true.  


Please try the above solution and let us know if you need any further assistance. 

Regards, 
Nevitha 



AL Alex August 9, 2021 04:48 PM UTC

Hi, thanks for the reply.


As explained, we need multiple rooms linked to a single meeting. In our actual implementation we are building a restaurant reservation system where a booking might span multiple tables so we need to use an array or collection.


The above solution suggested works fine when having a single resource to an event but this does not cover our scenario, which is pretty common.    What is a group editing feature?

Regards,

Alex



NR Nevitha Ravi Syncfusion Team August 10, 2021 10:44 AM UTC

Hi Alex, 

Thanks for your update. 

We suspect that your requirement is to create appointments to multiple rooms and CRUD actions could affect the events in all the room which is the behavior of group editing. So kindly check the following demo and UG and let us know if this meets your requirement. 

If this doesn’t meet your requirement please share the following details to validate the requirement and provide prompt solution? 
  • Whether you need to create events to multiple room on runtime and on editing actions it should affect in existing room alone?
  • Or you have appointment collection for multiple room in database?

Regards, 
Nevitha 


Loader.
Up arrow icon