Drag and drop tasks in read-only mode (version 3.0)

Hello everyone!

First, I’m French so I would like to apologize for any mistakes that I can write in my posts. :slight_smile:

I currently use the free version of dhtmlxGantt 2.1.1 for testing purposes, but as part of a commercial project I would soon acquire the proper license.

Last week, I saw that 3.0 version of dhtmlxGantt was published, so I immediately wanted to test this version but a problem occurred in my case. In 2.1.1 version, it’s possible to set gantt in “read-only” mode and allow drag and drop of tasks (from the grid) with the “order_branch” property in same time. With 3.0 version, a new API for managing editability / readonly modes of individual tasks is occured. These new features will not allow me to perform a drag and drop of a task in “read-only” mode.

I read the guide entitled “Setting the Read-only mode” but I can’t allow only drag and drop of tasks in the grid in read-only mode. Maybe I don’t understand this new API functions and properties so I can’t use it properly to meet my need. I would like be sure that I can configure dhtmlxGantt to have same behavior as 2.1.1 version before buying a license.

Can you give me some help on this please ?

Thank you.
Best regards.

Hi,
ability to modify tasks hierarchy in readonly mode was considered as a bug, and was disabled in version 3.0
You can keep gantt in editable mode, but disable all operations except for a vertical d&d

[code]gantt.config.order_branch = true;

gantt.config.drag_move = false;
gantt.config.drag_resize = false;
gantt.config.drag_progress = false;
gantt.config.drag_links = false;
gantt.config.details_on_dblclick = false;

gantt.attachEvent(“onLinkDblClick”, function(id,e){return false;});
gantt.attachEvent(“onTaskCreated”, function(id,e){return false;});[/code]

Hi,

indeed ability to modify tasks hierarchy in readonly mode is not correct (read-only mode shall not allow any modification including vertical drag and drop) so this new behavior is consistent.

Your example works perfectly ! My problem is solved.

Thank you for your help.
Best regards.