Our state of the art Gantt chart


Post by shaveta »

Hi,

Is there a way to send value for WBS and Status column in sync API call, i am working with php demo example and want to write these values back to database?


Post by mats »

Please see https://bryntum.com/docs/gantt/#Gantt/data/field/WbsField#config-alwaysWrite this will include WBS in any requests. Status column is not something part of our offering, if you refer to our advanced demo, just add the field to your model:

static get fields() {
        return [
            { name : 'deadline', type : 'date' },
            'status' // For status column
        ];
    }

Post by shaveta »

mats wrote: Wed May 12, 2021 4:26 pm

Please see https://bryntum.com/docs/gantt/#Gantt/data/field/WbsField#config-alwaysWrite this will include WBS in any requests.

Thanks Mats!! I have tried below code in php example but don't see it to be working

columns : [
        { type : 'wbs', writeAlways:true },
        { type : 'name', width : 250 },
        { type : 'startdate' }
       ]

Do i need to add any other code to make it work?


Post by mats »

You mistyped it, check my link again :)


Post by shaveta »

mats wrote: Wed May 12, 2021 7:33 pm

You mistyped it, check my link again :)

My bad!! please have a look at attached screenshot, i don't see it working.

scr.png
scr.png (158.23 KiB) Viewed 893 times

Post by mats »

What version are you using?


Post by shaveta »

I am using gantt-4.1.2


Post by arcady »

Please read the docs carefully. You use the config on the column, but it's supposed to be used for the model field:

export default class MyTask extends TaskModel {

    static get fields() {
        return [
            { name : 'wbsValue', alwaysWrite : true },
            ...
        ];
    }
    ...

Post by shaveta »

arcady wrote: Thu May 13, 2021 6:28 am

Please read the docs carefully. You use the config on the column, but it's supposed to be used for the model field:

export default class MyTask extends TaskModel {

    static get fields() {
        return [
            { name : 'wbsValue', alwaysWrite : true },
            ...
        ];
    }
    ...

Looks like it is not working if writeAllFields is set to true.


Post by saki »


Post Reply