问题
I am searching for a solution to how I can start an ag-grid table with only cell editors. That means I do not want to click into the row or cell to edit the data.
I have found almost a solution for me with this example in the doc: Full row editing
This is exactly what I am searching for. I can programmatically start editing immediately. The problem with that example is that onCellValueChanged
is only fired after the keyboard click "enter" or click on the next row.
I would need a solution where onCellValueChanged
is fired immediately after a cell changed.
回答1:
I can think of two ideas to accomplish this:
Use "No Click Editing" This is similar to having all cells contain an input box. It just takes 1 click to focus. https://www.ag-grid.com/javascript-grid-cell-editing/#no-click-editing
Custom cell renderer Use a custom cell renderer to have input boxes in each cell. Then, you are always in edit mode. And you can control when the value is saved. https://www.ag-grid.com/javascript-grid-cell-rendering-components/
来源:https://stackoverflow.com/questions/59704605/start-cell-editor-immediately-on-all-cells