Our state of the art Gantt chart


Post by lanpeng »

Hi bryntum team,
Based on the use-case and example images I have provided to you,
The effort field of the editor can be edited, but I want to limit it. The minimum effort value for each row data should be equal to donehours.

	 {
                            text: 'Effort',
                            field: 'assignEfforts',
                            filterable: false,
                            editor : {
                                type       : 'numberField',
                                editable   : true,
                                clearable : false,
                                min:30,    // how to defined ?
                                listeners:{
                                    catchAll(data){
                                        console.log(data)
                                    }
                                }
                            },
                            width: 80,
                        }

But here, how can I obtain the value of doneHours for this data? And then i can set the property "min".

Another question is that When a user clicks the save button in the editor, how can I retrieve the currently selected data? What I mean is, is there a hook function?

Attachments
screenshot.png
screenshot.png (207.29 KiB) Viewed 91 times
use-case.zip
(68.55 KiB) Downloaded 9 times

Post by alex.l »

Hi,

You can add https://bryntum.com/products/gantt/docs/api/Gantt/feature/CellEdit#event-beforeCellEditStart listener that has access to record and set editor's configs as you need.
column param will help to identify target column.

All the best,
Alex


Post Reply