Premium support for our pure JavaScript UI components


Post by sprabhu »

Hi,
Using the advanced examples of Gantt, we came across 2 issue related to the date columns:

  1. The font is set to same as foreground - not able to view the date
  2. roll-up is not working(how can we enable the rollup for the date columns)

Please go through the video using the link below
example link-->https://bryntum.com/products/gantt/examples/advanced/
Video link -->https://frontrol-my.sharepoint.com/:v:/p/cgupta/EaUOIT4o4qJEpsvs_Lwdb_MBURJ5WaW2FJE7OQNQoZScYA?e=V4SrWc


Post by arcady »

You need to make a field to store changes you provide in the column:

//
class Task extends TaskModel {

    static fields = [
        // add new customDate field
        { name : 'customDate', type : 'date' }
    ];

    ...
const gantt = new Gantt({
    project : {
        taskModelClass : Task,
        ...
    },

    columns : [
        // add column displaying customDate
        { type : 'date', field : 'customDate', text : 'Custom Date' },
        ...

Post by arcady »


Post by sprabhu »

Hi,
The font issue where its getting set same as foreground is still happening. Can you help us to address that.


Post by sprabhu »

Also, the Grid.column.AggregateColumn which you have mentioned does the aggregate of number columns only, we are looking for the date column roll-up. like you have on 'Start' column on Advance demo
FYI: we don't want to lose the date picker functionality by giving some other type like aggregate.


Post by mats »

@sprabhu: How should dates rollup? You could probably override our internal renderer to provide your own logic for your date columns.


Post by sprabhu »

Hi Mats,
As in the Advanced demo examples, if we enable the 'Finish' column and extend the date of any child task, the date is rollup in other words the parent task Finish date gets extended to include the child Finish date. How can we achieve this on custom date columns.
Also, can you please help on the field format, currently the font and foreground is getting set to white due to which the date is not visible.
here is the video: https://frontrol-my.sharepoint.com/:v:/p/cgupta/EaUOIT4o4qJEpsvs_Lwdb_MBURJ5WaW2FJE7OQNQoZScYA?e=V4SrWc


Post by mats »

As in the Advanced demo examples, if we enable the 'Finish' column and extend the date of any child task, the date is rollup in other words the parent task Finish date gets extended to include the child Finish date. How can we achieve this on custom date columns.

You can implement any logic you want using the Column renderer method for your custom date columns. Please see: https://bryntum.com/products/gantt/docs/api/Grid/column/Column#config-renderer

Also, can you please help on the field format, currently the font and foreground is getting set to white due to which the date is not visible.

You're not setting a field on your column, this is required for the column to know what to display.


Post by sprabhu »

Hi Mat,
Yes, we can implement any logic using renderer, but you already have a logic in place which is used by start date and end date columns. Cant we reuse that code to custom date columns? Can you help us to understand how we can hookup the standard Bryntum date logic( i.e. extend the date from child to parent record) to custom date column


Post by alex.l »

Hi sprabhu,

Sure you can re-use our code. Please see source code of StartDateColumn.js and EndDateColumn.js, it contains full solution for the column. For other logic with dates calculations, if required, you'll need to check TaskModel.js and parent classes, as well as AbstractCalendarMixin.js for calculateStartDate method.
If you need our help with development, please contact our Sales within the form here https://bryntum.com/services and our developers will help you.

All the best,
Alex


Post Reply