Discuss anything related to web development but no technical support questions


Post by sandippatel »

Hi there

I was reading the documentation and found that we could make the read-only rows for Bryntum Gantt chart.so would it be possible to only make the first row as read-only like I have mentioned in the image?

Image

Thanks

Attachments
readonly.PNG
readonly.PNG (103.11 KiB) Viewed 1693 times

Post by pmiklashevich »

Hello,

There is no a config/field for it. Here is a feature request to make it configurable. https://github.com/bryntum/support/issues/665
To achieve what you need please configure all features which provide editing (e.i. cellEdit, drag, resize, taskEdit, etc.) to prevent it in case of the specified record. For example:
https://www.bryntum.com/docs/gantt/#Gantt/feature/CellEdit#event-beforeCellEditStart
https://www.bryntum.com/docs/gantt/#Gantt/feature/TaskEdit#event-beforeTaskEdit
and so on

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by sandippatel »

Thanks for the reply. I am also curious do we able to get the row number of selected column anyway? I have see the documentation but could not found as such.


Post by saki »

I'm not quite sure what you mean by

row number of selected column

Anyway, you can get the index of the selected record (row) with:

gantt.taskStore.indexOf(gantt.selectedRecords[0])

Post Reply