Hello Isomorphic,
We need to implement functionality on a ListGrid such that we react to changes on a Cell (using an event handler). In essence, we simply need to register a handler for an event that fires when a cell changes its value (whether this was through a direct edit (using the field editor), indirect edit (for example Paste, or Ctrl+D, Ctrl+R), or programmatically changed).
We have tried the following methods, which seemed the closest to what we need, but they don't really give us what we want:
- ListGridField.addChangeHandler: we can't use this method for our purposes, since
a) it fires before the cell actually changes (once you enter the Cell Editor, this event fires on every key-stroke)
b) it does not fire when the user presses escape (cancels the edit)
c) it does not fire when doing Ctrl+D or Ctrl+R (fill down, fill right)
- ListGridField.addChangedHandler: same issues as addChangeHandler, plus, it does not provide the old value
We look at other methods as well (ListGrid.addEditCompleteHandler, ListGrid.addCellSavedHandler) but they don't fire on change (they fire after a data is saved to the back-end). Also ListGrid.addEditorExitHandler, but it doesn't work for us because we need to be notified of changes even if they user does not use an editor to change the value.
What is your recommendation? Is there an API call to handle this and we simply missed it, or can this be added to your APIs? We're using the latest release (12).
Thanks!
We need to implement functionality on a ListGrid such that we react to changes on a Cell (using an event handler). In essence, we simply need to register a handler for an event that fires when a cell changes its value (whether this was through a direct edit (using the field editor), indirect edit (for example Paste, or Ctrl+D, Ctrl+R), or programmatically changed).
We have tried the following methods, which seemed the closest to what we need, but they don't really give us what we want:
- ListGridField.addChangeHandler: we can't use this method for our purposes, since
a) it fires before the cell actually changes (once you enter the Cell Editor, this event fires on every key-stroke)
b) it does not fire when the user presses escape (cancels the edit)
c) it does not fire when doing Ctrl+D or Ctrl+R (fill down, fill right)
- ListGridField.addChangedHandler: same issues as addChangeHandler, plus, it does not provide the old value
We look at other methods as well (ListGrid.addEditCompleteHandler, ListGrid.addCellSavedHandler) but they don't fire on change (they fire after a data is saved to the back-end). Also ListGrid.addEditorExitHandler, but it doesn't work for us because we need to be notified of changes even if they user does not use an editor to change the value.
What is your recommendation? Is there an API call to handle this and we simply missed it, or can this be added to your APIs? We're using the latest release (12).
Thanks!
Comment