Discuss anything related to web development but no technical support questions


Post 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 1495 times
issue json.json
json file
(1.9 KiB) Downloaded 271 times

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


Post 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' }
        ];
    }
}

Post Reply