Our state of the art Gantt chart


Post by rodel.ocfemia »

Hi,
Is there a way to lock/disable edit for a particular column of a particular record only? We cannot apply readOnly to a particular record because it will set all fields as readOnly.

In the example below, we need to lock all fields of Gate 1 record except the Finish date.

Capture.PNG
Capture.PNG (33.83 KiB) Viewed 132 times

Post by tasnim »

Hi,

You could listen to https://bryntum.com/products/grid/docs/api/Grid/feature/CellEdit#event-beforeCellEditStart listener

        beforeCellEditStart(event) {
            const { editorContext } = event;
            if (editorContext.column.field === 'city' && editorContext.value.toLowerCase() === 'paris') {
                return false;
            }
        }

Post Reply