我遇到的情况是我有一个带有行的网格。双击单元格,将打开单元格编辑器。
celleditor cellEditingStarted 和 cellEditingStarted 周围有一些事件,您可以在需要时执行某些操作。
我需要在单元编辑器打开之前发生一个事件。
用户双击单元格,需要在那里做一些事情,然后单元格编辑器就会弹出。
有这样的事吗?在文档中找不到。
我想要做的是:自定义单元格编辑器从网格中弹出,当网格靠近屏幕底部时,单元格编辑器只有一半可见,我做了一个技巧,在网格下放置一个 div 并添加一行,该 div 扩大了其高度,因此它可以正常工作,但是当您双击该单元格时无法使其工作,它无法正确滚动
谢谢
i have a situation where i have a grid with rows. on a cell double click, cell editor is opened.
there are events arround celleditor cellEditingStarted and cellEditingStarted where you can do something if needed.
i need an event which is just before the celleditor opened.
a user double clicked the cell, need to do some thing there and the cell editor pops out after that.
is there something like that? cant find in documentation.
what i want to do is: custom cell editor pops out of the grid, and when the grid is near the bottom of screen, the cell editor is only half visible, and i made a trick, put a div under the grid and on adding a row, that div enlarges its height so it works fine, but cant make it work when you double click that cell, it doesn't scroll properly
thanks
发布评论
评论(1)
您可以在自定义单元格编辑器中使用
agInit
生命周期方法来处理此用例,因为它在cellEditingStarted
之前触发:您可以在 下面的plunkr,打开开发者控制台可以看到控制台日志语句。
You can use the
agInit
lifecycle method inside the Custom Cell Editor to handle this use case as it is fired beforecellEditingStarted
:You can verify this in the following plunkr, open the developer console to see the console log statements.