Show cool things you have done with our products


Post by Jean »

Hi,

Please can you tell me how I can add tasks.
In this case :
1.- I selected a task
2.- I show my form
3 .- I add 3 objects with the following formats:
{
     "Id"        : 1,
     "StartDate" : "2017-01-17",
     "EndDate" : "2017-01-19" 
     "Duration"  : 2
},
{
     "Id"        : 2,
     "StartDate" : "2017-01-20",
     "EndDate" : "2017-01-22" 
     "Duration"  : 2
}
4.- When I click on the SAVE button, the list of segments applies to the TASK.

Is there an event or method?



Different from this method :
    splitTask: function() {
        var a = this,
            e = a.grid.getSchedulingView(),
            d = e.getDateFromX(a.triggerEventXY[0]),
            c = e.timeAxis;
        var b = {
            task: a.rec,
            pos: a.triggerEventXY,
            date: d,
            timeAxis: c,
            tick: c.getAt(Math.floor(c.getTickFromDate(d)))
        };
        b.task.split(a.getSplitDate(b), a.getSplitDuration(b), a.getSplitDurationUnit(b))
    }
Or

Can you tell me how to configure the method to add many segments?


attached image.

thanks.
Attachments
Is there an event or method?
Is there an event or method?
segment2.png (92.78 KiB) Viewed 5073 times

Post by mats »

You can probably implement this yourself, by using our Splittable API. https://www.bryntum.com/docs/gantt-for- ... Splittable

Note the 'split' API method: https://www.bryntum.com/docs/gantt-for- ... thod-split

Post Reply