PDA

View Full Version : Preventing user from exiting grid row or cell



msieg
7 Aug 2007, 10:51 AM
Does anyone know if there is a way to trap a user in either a cell or a row?

I'd like to be able to validate data in the grid and prevent the user from exiting (cell or row) unless the data is valid.

Any help here would be much appreciated.

devnull
7 Aug 2007, 1:02 PM
I suppose you could try something simple, like force focus back on the object in its blur event, but this is just a gues.

msieg
7 Aug 2007, 1:33 PM
Thank you, however I gave that a shot and it wasn't really a clean solution. I'm wondering if there is something built into ext or if there is some way of canceling the events.

Has anyone else done anything like this? Or is there something built in to handle this?

tryanDLS
7 Aug 2007, 4:52 PM
http://extjs.com/deploy/ext-1.1/docs/output/Ext.grid.EditorGrid.html#event-validateedit

msieg
7 Aug 2007, 5:02 PM
thank you, I've seen that event and played around with it but I haven't been able to get the desired behavior. Can you further describe, or show an example of how i would keep the focus in the cell or row if the data is invalid?

Thank you again...