Approved
Last Updated: 26 Nov 2019 09:59 by ADMIN
Sergio
Created on: 25 Nov 2019 16:00
Category: Gantt
Type: Feature Request
0
Change tasks order

Hello,

I have a Gantt that only can have two levels. I guess drag&drop is the best and easiest way to do this (Is it a better solution like editing the order value directly in the TreeList area?)

I want to implement order change in the following way. 

  1. If user changes parent task order, he has to drag that parent task (A) and drop on another parent task (B). This way, task A will take task B order value (Shall task B take task A order?). If user drops parent task A on any child task, no order change will happen.
  2. Drag of any child task only will be valid in the same parent. I mean, dropping child task in any parent task or in other parent child task will do nothing.

Could you send me any example of this behaviour?

Regards!

 

1 comment
ADMIN
Ivan Danchev
Posted on: 26 Nov 2019 09:59

Hello Sergio,

The Gantt does not expose API methods and events dedicated to handling such reordering scenarios. Even though drag and drop of tasks over other tasks can be prevented conditionally in the Save event, for example:

function onSave(e) {
  if(e.task.id == 1 || e.values.parentId == 1 || e.values.orderId == 0)
  {
    e.preventDefault();
  }
}

the event does not contain data about where the task is dropped or even whether it is triggered by drag/drop. Thus implementing the described reordering scenarios would require a custom solution.

Because of that I will convert this thread into a feature request item and make it visible in the Feedback Portal. Based on the interest the community shows in it, we will consider improving the API so that more complex reordering scenarios can be handled.

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.