Page 1 of 1

issue while loading data from database

Posted: Mon Nov 23, 2020 3:51 pm
by sandippatel

Hello

I am trying to save the data into database and when loading the Gantt chart I am trying to get the data from the database.

It saves successfully but when try to load the data from the database it does not show name of the task.

Please find the attached screenshot and json I use to load the database.

issue1.PNG
issue1.PNG (24.6 KiB) Viewed 1554 times
issue json.json
json file
(1.9 KiB) Downloaded 279 times

What would be the reason to not display the name even if it is there in json.


Re: issue while loading data from database

Posted: Mon Nov 23, 2020 6:39 pm
by mats

Your field name is 'Name', we expect lowercase 'name' by default. You can redefine field names in your https://bryntum.com/docs/gantt/#Gantt/model/TaskModel

using https://bryntum.com/docs/gantt/#Core/data/field/DataField#config-dataSource

class MyTask extends TaskModel {
    static get fields {
        return [
            { name : 'name', dataSource : 'Name' }
        ];
    }
}