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?
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
];
}
mats wrote: ↑Wed May 12, 2021 4:26 pmPlease 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?
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 },
...
];
}
...
arcady wrote: ↑Thu May 13, 2021 6:28 amPlease 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.
Try to also set https://bryntum.com/docs/gantt/#Core/data/field/DataField#config-persist to true.