Our state of the art Gantt chart


Post by cllor »

I tried to add a new text column of Task Group.
But the gantt not able to render out.
May I know what is the issue?

class MyModel extends TaskModel {
    static get fields() {
        return [
           { name : 'taskGroup', type : 'text' }
        ];
    }
}

taskEdit : {
            items : {
                generalTab : {
                    // change title of General tab
                    title : 'Common',
                    items : {
                        customDivider : {
                            html    : '',
                            dataset : {
                                text : 'Custom fields'
                            },
                            cls  : 'b-divider',
                            flex : '1 0 100%'
                        },		
			TaskGroupField : {
                            type  : 'textfield',
                            name  : 'taskGroup',
                            label : 'Task Group',
                            flex  : '1 0 50%',
                            cls   : 'b-inline'
                        }	
                    }
                }
            }
        }

columns : [
        { type : 'wbs' },
        { type : 'name', width : 250 },
        { type : 'startdate' },
        { type : 'duration' },
        { type : 'effort' },
        { type : 'resourceassignment' },
        { type : 'percentdone', width : 70 },
        { type : 'predecessor' },
        { type : 'successor' },
        { type : 'schedulingmodecolumn' },
        { type : 'calendar' },
        { type : 'constrainttype' },
        { type : 'constraintdate' },
        { type : 'text', field : 'taskGroup', text : 'Task Group' }
        { type : 'addnew' }
    ],
Attachments
app.module.js
(14.69 KiB) Downloaded 63 times

Post by saki »

There is no obvious problem with your TaskModel extension or project definition. However, there are some unusual spots, for example processResource function where you create resource records manually. The same is in processDependency, processAssignment, processTask and processCalendar functions.

There might be a good reason for that but it is unusual as Gantt takes care of creating its required stores and records automatically w/o user intervention.

Anyway, prepare please a showcase that we could run, investigate and debug so that we can sort-out what's happening.


Post by cllor »

Dear saki,

I managed to add the new column of taskGroup in generalTab.
But I not able to extend TaskModel in order to be able to add custom column into the table using the add new column button.

Attachments
AddNewColumn-TaskGroup.jpg
AddNewColumn-TaskGroup.jpg (214.66 KiB) Viewed 1248 times
support.zip
(2.19 MiB) Downloaded 55 times

Post by alex.l »

Hi cllor,
I was not able to launch your app. I checked the code and don't see any column definition. I see you added new field into a panel, but I don't see any code to add column, register custom column type, extend TaskModel...

Please read our guides and check if you attached a correct and runnable showcase.
https://bryntum.com/docs/gantt/#Grid/column/Column
https://bryntum.com/docs/gantt/#Core/widget/TextField
https://bryntum.com/docs/gantt/#Gantt/guides/customization/taskedit.md
https://bryntum.com/docs/gantt/#Gantt/column/AddNewColumn
https://bryntum.com/docs/gantt/#Gantt/model/TaskModel

Our https://bryntum.com/examples/gantt/advanced demo has an example of register a new column type.

All the best,
Alex


Post by cllor »

Thanks alex, I managed to make it work after refer to the advanced demo.
Thanks for the guide.


Post Reply