ag-grid cell editor before open event

693 Views Asked by At

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

enter image description here thanks

1

There are 1 best solutions below

1
Shuheb On BEST ANSWER

You can use the agInit lifecycle method inside the Custom Cell Editor to handle this use case as it is fired before cellEditingStarted:

export class MoodEditor implements ICellEditorAngularComp {

  agInit(params: any): void {
    console.log('agInit, handle logic here');
  }

// ...

You can verify this in the following plunkr, open the developer console to see the console log statements.