Allow Drag & Drop Not working in Gantt chart ASP.NET MVC


someone please help me 

i trying to do Drag & drop in my Gantt chart from one resource to another resource 


Example i trying to drag AR21 in BB No 1 into BB No 2 but i cant drag it.


this is my Code, if you see i am already put "AllowRowDrag&Drop", am i missing something ?


6 Replies

UA Udhayakumar Anand Syncfusion Team May 16, 2023 02:26 PM UTC

Hi Muqaffi Gusticahyo Adi Bhaskoro,


Thank you for reaching out to us. We have thoroughly reviewed your query, but unfortunately, we were unable to replicate the issue you reported. In order to assist you further, could you please provide us with the following details:


  1. Data source and resource that you’re using
  2. Any other customization that you’ve made in batch update
  3. Version of Gantt that you use
  4. Video demonstration of the issue
  5. Could you please modify the given sample and replicate the issue, which will be helpful for us to validate further


Sample Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/row_drag_and_drop_mvc-2080604262


Once we have these details, we will be able to validate your setup more effectively and provide you with the appropriate solution.


If you have any additional questions or require further assistance, please don't hesitate to let us know.


Regards,

Udhayakumar



MG Muqaffi Gusticahyo Adi Bhaskoro May 17, 2023 02:24 AM UTC

Datasource



    public class GanttDataSource

    {

        public int Id { get; set; }

        public string Machine { get; set; }

        public string Size { get; set; }

        public DateTime StartDate { get; set; }

        public DateTime EndDate { get; set; }

        public DateTime BaselineStartDate { get; set; }

        public DateTime BaselineEndDate { get; set; }

        public int? Duration { get; set; }

        public bool IsManual { get; set; }

        public int Progress { get; set; }

        public string Predecessor { get; set; }

        public List<GanttDataSource> SubTasks { get; set; }

        public int[] ResourceId { get; set; }

        public List<ResourceGroupCollection> Resources { get; set; }

        public string Notes { get; set; }

        public int? Work { get; set; }

        public int ParentID { get; set; }

        public List<IndicatorsModel> Indicators { get; set; }

    }


this is my Resource 


   

 public class ResourceGroupCollection

    {

        public int ResourceId { get; set; }

        public string ResourceName { get; set; }

        public Nullable<int> ResourceUnit { get; set; }

        public string ResourceGroup { get; set; }

        public bool isExpand { get; set; }

    }


Batch Update Add 



Batch Update Edit



Batch Update Delete




my Syncfusion version is 

Version=19.4500.0.38




MG Muqaffi Gusticahyo Adi Bhaskoro replied to Udhayakumar Anand May 17, 2023 08:09 AM UTC

Datasource



    public class GanttDataSource

    {

        public int Id { get; set; }

        public string Machine { get; set; }

        public string Size { get; set; }

        public DateTime StartDate { get; set; }

        public DateTime EndDate { get; set; }

        public DateTime BaselineStartDate { get; set; }

        public DateTime BaselineEndDate { get; set; }

        public int? Duration { get; set; }

        public bool IsManual { get; set; }

        public int Progress { get; set; }

        public string Predecessor { get; set; }

        public List<GanttDataSource> SubTasks { get; set; }

        public int[] ResourceId { get; set; }

        public List<ResourceGroupCollection> Resources { get; set; }

        public string Notes { get; set; }

        public int? Work { get; set; }

        public int ParentID { get; set; }

        public List<IndicatorsModel> Indicators { get; set; }

    }


this is my Resource 


   

 public class ResourceGroupCollection

    {

        public int ResourceId { get; set; }

        public string ResourceName { get; set; }

        public Nullable<int> ResourceUnit { get; set; }

        public string ResourceGroup { get; set; }

        public bool isExpand { get; set; }

    }


Batch Update Add 



Batch Update Edit



Batch Update Delete




my Syncfusion version is 

Version=19.4500.0.38



UA Udhayakumar Anand Syncfusion Team May 17, 2023 03:18 PM UTC

Muqaffi Gusticahyo Adi Bhaskoro,


After carefully reviewing your query, we have identified a possible reason for the drag and drop issue you are experiencing. We have attached a video demonstration that showcases the possible scenario that you might face the issue.


In the video, you will notice that the row can only be dragged and dropped when it is completely aligned with the target line. If the row is placed above or below the line, the drag and drop functionality may not work as intended. Kindly review the attached video to verify if this aligns with the issue you are facing.


If the problem you're encountering is different from what we have demonstrated, we kindly request you to provide us with the following information:


  1. Video demonstration of the issue
  2. Data source and resource that you use
  3. Could you please modify the given sample and replicate the issue which will be helpful for us to validate further

Sample Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/TestSample-1829141365


Regards,

Udhayakumar


Attachment: video_74c021e5.zip


MG Muqaffi Gusticahyo Adi Bhaskoro replied to Udhayakumar Anand May 18, 2023 04:02 AM UTC

we want to copy this Drag & Drop function 

https://ej2.syncfusion.com/aspnetmvc/GanttChart/ResourceMultiTaskbar#/fluent 

but its not working like that 



UA Udhayakumar Anand Syncfusion Team May 18, 2023 02:40 PM UTC

Muqaffi Gusticahyo Adi Bhaskoro,


We have thoroughly reviewed your query regarding the Drag & Drop function in our Gantt Chart component.


To address this issue, we recommend setting the "allowTaskbarDragAndDrop" property to "true" inside the "created" event. However, please note that this feature is only available from version 21.1.35 onwards and it is only applicable for resource view. Therefore, we kindly request you to update to the latest version to leverage this functionality fully.


To assist you further, we have prepared a code snippet and a sample link that demonstrate the implementation of the Drag & Drop function. You can find them below:



Code Snippet:

/*index.cshtml*/

<script>

    function Created(args) {

        var ganttObj = document.getElementsByClassName('e-gantt')[0].ej2_instances[0];

        ganttObj.allowTaskbarDragAndDrop = true;

    }

</script>


Sample Link https://www.syncfusion.com/downloads/support/directtrac/general/ze/task_bar_drag_and_drop780028381


Please try implementing the suggested approach and let us know if you encounter any issues or require any further assistance.


Regards,

Udhayakumar


Loader.
Up arrow icon