Drag & Drop from External Source without Edit Popup

I have tried different things, I have tried calling the AddEvent directly but didnt work. Is there a way to Drag & Drop from External Source without Edit Popup. Just like i would drop the external Event on a cale,dar time slot and it gets created.

On a Different Note I have Noticed that the TodayView on Add or Remove Resource is not working.

1 Reply

AK Alagumeena Kalaiselvan Syncfusion Team April 28, 2020 02:06 PM UTC

Hi Vamsi, 

Thanks for contacting Syncfusion support. 

We have validated your reported case “Drag and drop from external source without edit popup” and you can achieve this case by using Scheduler AddEvent method. We have prepared a sample based on your requirement which can downloaded from the below link. 

public async void OnTreeViewDragStop(DragAndDropEventArgs args) 
    { 
        args.Cancel = true; 
        object isScheduleSlot = await args.Target.GetAttribute("role"); 
        if (isScheduleSlot != null && isScheduleSlot.ToString() == "gridcell") 
        { 
            CellClickEventArgs cellData = await ScheduleRef.GetCellDetails(args.Target); 
            var resourceDetails = await ScheduleRef.GetResourcesByIndex(cellData.GroupIndex); 
            GroupData groupData = JsonConvert.DeserializeObject<GroupData>(JsonConvert.SerializeObject(resourceDetails.GroupData)); 
            Random rnd = new Random(); 
            int Id = rnd.Next(1000); 
            HospitalData eventData = new HospitalData 
            { 
                Id = Id, 
                Name = args.DraggedNodeData.Text, 
                StartTime = cellData.StartTime, 
                EndTime = cellData.EndTime, 
                IsAllDay = cellData.IsAllDay, 
                ConsultantID = groupData.ConsultantID, 
                DepartmentID = groupData.DepartmentID 
            }; 
            await ScheduleRef.AddEvent(eventData);  // To add the events into the Scheduler 
        } 
    } 




Kindly check the above sample and get back to us if you need any further assistance. 

Regards 
Alagumeena.K  


Loader.
Up arrow icon