Our state of the art Gantt chart


Post by bertwilli »

Hi,

What is the best way to detect if the tree is grouped by a date field in the renderer function?

labels: {
                after: {
                    renderer({ taskRecord }) {
                         return `${taskRecord.name}`;
                    }
                }
            }

I would like to format the date value as it is show in grid input field.
Please see the screenShot for details.

Thanks, Bert

Attachments
RenderLabelWhileTreegroupByDate.png
RenderLabelWhileTreegroupByDate.png (557.72 KiB) Viewed 80 times

Post by alex.l »

Hi bertwilli,

There is https://bryntum.com/products/grid/docs/api/Grid/feature/TreeGroup#property-levels property that you can check.
Group level is not always a field, in might be a function, so you need to check levels array.

gantt.features.treeGroup.levels[0].fieldName

All the best,
Alex


Post Reply