editing a specific property gantt.config.editable_property

Hi,

I am trying to make a few tasks and its properties editable.

When I specify the editable_property, using the name provided in the lightbox section of the task.

But on double clicking the task, the lightbox doesn’t appear, when having editable property.But if i comment the editable_property, it works fine.

check the snippet once.

http://docs.dhtmlx.com/gantt/snippet/2c0649e0

  1. What am I doing wrong?
  2. property_name means the name given in the lightbox_section or the one in the columns of the task?
  3. can I specify multiple editable properties?

Thanks,

Hello,
1)the ‘editable_property’ goes for the property of the task data object, not the lightbox section or the column of the lefthand grid:
{
data:[
{id:1, text:“Project #2”, start_date:“01-04-2013”, duration:18,order:10, progress:0.4, parent:0, editable:false},
{id:2, text:“Task #1”, start_date:“02-04-2013”, duration:8, order:10, progress:0.6, parent:1, editable:true},
{id:3, text:“Task #2”, start_date:“11-04-2013”, duration:8, order:20, progress:0.6, parent:1, editable:true}
],
links:[
]
}

  1. If you want to make it settable from the lightbox, you need to set the ‘editable_property’ to the same property the control is mapped to:

gantt.config.lightbox.sections = [
{name: “description”, height: 38, map_to: “some_property”, type: “textarea”, focus: true},

]
scheduler.config.editable_property = “some_property”;

  1. Only one property can be specified here. If you want to make events conditionally editable based on set of properties, you can either manage their editability manually, for example by blocking onBeforeLightbox and onBeforeTaskDrag events
    docs.dhtmlx.com/gantt/api__gantt … event.html
    docs.dhtmlx.com/gantt/api__gantt … event.html

Or, you can dynamically update the ‘editable_property’ each time the task is loaded, added or updated:

docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html
docs.dhtmlx.com/gantt/api__gantt … event.html
E.g.

gantt.attachEvent("onTaskLoading", function(task){ task.editable = task.has_owner && task.editable && task.text; return true; });