By default I can edit a cell by clicking on it. I would like to disable this function and add a click event on the pencil icon to then modify the first cell of the corresponding row as attached.
How can I achieve this?
thanks
Support Forum
Hi d.salvati,
ActionColumn docs is here: https://bryntum.com/docs/grid/#Grid/column/ActionColumn
Cell editing is provided by this feature: https://bryntum.com/docs/grid/#Grid/feature/CellEdit
Please, review docs and let us know if you still have questions.
https://bryntum.com/docs/grid/#Grid/feature/CellEdit#config-triggerEvent
https://bryntum.com/docs/grid/#Grid/feature/CellEdit#function-startEditing
https://bryntum.com/docs/grid/#Grid/feature/CellEdit#preventing-editing-of-certain-cells
https://bryntum.com/docs/grid/#Grid/feature/CellEdit#event-beforeCellEditStart
const grid = new TreeGrid({
appendTo : document.body,
features : {
cellEdit : {
triggerEvent : ''
}
},
columns : [
// .....
{
type : 'action',
text : 'Edit record',
actions : [{
cls : 'b-fa b-fa-pencil',
onClick : ({ record }) => grid.startEditing(record)
}]
}]
});
All the best,
Alex
All the best,
Alex
Hello.
It is possible with a Popup, few fields, button and event listeners, there's no default editor in the code base. Please refer to this demo to see how we make editor with a popup component: https://bryntum.com/examples/grid/columns/ And please refer to this doc article for popup: https://bryntum.com/docs/grid/#Core/widget/Popup