Our state of the art Gantt chart


Post by harshalkhode1703 »

hii,
i am using bryntum gantt and want to add a button with every task.
but conditinally
I want to add button only with parent task.
how can i achive that

example image:

Screenshot from 2023-03-14 15-45-31.png
Screenshot from 2023-03-14 15-45-31.png (31.37 KiB) Viewed 179 times

according to the image i want to add button only with task named "parent" and "Task Group 2" but not with their children tasks.


Post by tasnim »

Hi,

You could use https://bryntum.com/products/gantt/docs/api/Grid/column/Column#config-renderer and put a condition inside and and add your logic inside of your condition

Example

renderer : ({ record }) => {
	if (!record.isLeaf) {
		// logic here
	}
}

https://bryntum.com/products/gantt/docs/api/Gantt/model/TaskModel#property-isLeaf

I hope this will help


Post by Animal »

That would be better done with an ActionColumn: https://bryntum.com/products/gantt/docs/api/Grid/column/ActionColumn


Post Reply