start cell editor immediately on all cells

让人想犯罪 __ 提交于 2021-01-29 13:45:27

问题


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:

  1. 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

  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!