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. Image for the cookie policy date

Confusion while drag & drop / Work column mapping

Hello,

PFA. We have provided drag & drop in Gantt chart. When we drop row on another row there are two cases

1) We can observe straight arrow - In which case,it works as expected. e.g. Dropped row is getting added as child node.
2) Confusion starts when it shows right arrow - In this case,sequence of task gets changed which reflects only on UI. Once postback takes place,the change is getting reverted. 

How to restrict this functionality only to point 1?

Apart from that,currently we are mapping hrs field with duration column. Is there anyway we can map work column with hrs field?

Attachment: DragDrop_2273d610.zip

5 Replies

JS Jonesherine Stephen Syncfusion Team January 3, 2017 12:23 PM UTC

Hi Kuntal, 
Please find the response below: 
Query 
Response 
We can observe straight arrow - In which case, it works as expected. E.g. Dropped row is getting added as child node. 
Confusion starts when it shows right arrow - In this case, sequence of task gets changed which reflects only on UI. Once post back takes place, the change is getting reverted.  
 
 
 
 
 
We have prepared the work around and updated the Gantt data base on drag and drop actions. 
Please find the cod example below: 
function rowDragStop(args) {             
  var cloneData = $.extend({}, args.draggedRow.item); 
if (args.requestType == "insertAsChild") { 
                cloneData[args.model.parentTaskIdMapping] = args.targetRow.item[args.model.taskIdMapping]; 
            } 
if (args.requestType == "insertAbove" || args.requestType == "insertBelow") {                cloneData[args.model.parentTaskIdMapping] = args.targetRow.item[args.model.parentTaskIdMapping]; 
            } 
            var data = cloneData; 
            $.ajax({ 
                type: "POST", 
                url: '/Gantt/Update', 
                data: data, 
                dataType: "json", 
            }); 
        }; 
 
How to restrict this functionality only to point 1? 
 
We are facing some difficulties while canceling the drag and drop under particular condition. We have confirmed this as bug and logged a report on this. Also we have created a support incident under your account to track the status of this issue. 
Please log on to our support website to check for further updates. 
 
Apart from that, currently we are mapping hrs. field with duration column. Is there any way we can map work column with hrs. Field? 
 
 
 
 We can bind different unit to work field by using “workUnit” property.  
Please find the code example below: 
  @(Html.EJ().Gantt("Gantt").  
       WorkUnit(GanttWorkUnit.Hour).       
           ) 
    @(Html.EJ().ScriptManager()) 
 
We have also prepared the sample based on this, please find then sample from below location 
Regards, 
Jone sherine P S 



KP Kuntal Patel January 10, 2017 07:02 AM UTC

Hello,

Thanks for your response. What i was trying to say is we are currently using .....DurationMapping("EstimatedHours").... which means calculation will be based on the changes made on duration column. Is there any way possible so that i can implement same functionality over work column. e.g. .....WorkMapping("EstimatedHours")....  something like that.


JS Jonesherine Stephen Syncfusion Team January 11, 2017 01:10 PM UTC

Hi Kuntal, 
The work field column in Gantt is calculated internally based on the duration and resource unit fields from the data source. Unlike duration column, we cannot map the values for work field columns directly from the data source using any mapping property. But we can edit the work column dynamically and set any value and based on this value the duration and resource unit values will be updated. Please find the below online documentation which describes the relation between duration, work and resource unit fields. 
If you want to achieve your requirement, then you can include a custom column in Gantt and can update the values in custom work column at sample level. 
Regards, 
Jone sherine P S 



KP Kuntal Patel January 12, 2017 01:15 PM UTC

Let me explain the scenario with Practical Example.

I am a Project Manager, having 1 Business Analyst, 3 Developers & 1 QA team.

Once as a team we got the clarity from BA (Business Analyst) on module requirement, we break down the complete requirement in small tasks. Then as a Team we derive the Estimated Hours and decide the Responsible Person for each task.

As soon as we start Assigning the task, inputting the Estimated Hours, based on Project Start Date and Predecessor, End Date will be calculated and set Automatically.

So here, we know Size of Task, how much effort required to completed the task and Duration gets calculated based on Estimated Hours (Work) and Assigned Resource.

Now let me know how can we implement this.



JS Jonesherine Stephen Syncfusion Team January 13, 2017 02:14 PM UTC

Hi Kuntal, 
At present there is no support to map “Estimated Hours” in data source. For this we have already logged a feature request regarding this.A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
Please let us know if you require further assistance on this.
Regards,
 
Jone sherine P S

Loader.
Up arrow icon