I have custom text editor in table cell, after I select text in it I want to use top page panel to make it bold (outside of the table), but when I click on the button (on the top page panel) this action closes cell editor popup.
Is it posible to keep the cell editor open in popup mode after I click on buttons outside of the table?
If you want the grid to stop editing when focus leaves the cell or the grid, set the grid property stopEditingWhenCellsLoseFocus = true . The example below shows the editing with stopEditingWhenCellsLoseFocus = true .
Tab Key Down: Editing will stop, accepting changes, and editing will move to the next cell, or the previous cell if Shift is also pressed. Popup Editor Closed: If using popup editor, the popup is configured to close if you click outside the editor. Closing the popup triggers the grid to stop editing.
Enable Editing */> </ag-grid-angular> this. columnDefs = [ { field: 'athlete', // enables editing editable: true } ]; By default the grid provides simple string editing and stores the result as a string. The example below shows string editing enabled on all columns by setting editable=true on the defaultColDef .
You can add the button using a cellRenderer . Then when each of your button's are clicked, you can call a method to do your desired action, e.g. save row, delete row etc.
In the current version of ag-grid (v24), clicking outside the grid does not close a popup editor, unless you set stopEditingWhenGridLosesFocus
to true in the options.
See their example: https://www.ag-grid.com/javascript-grid-cell-editing/#example-dynamic-parameters
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With