PDA

View Full Version : Custom numberfield not working on rowchange



LeonM
8 Nov 2010, 8:57 AM
Hello,

I have an editorGrid with rowSelectionModel. Users enter information in this grid, but because there are both european as american users, I use a custom numberfield editor to accept both comma and dot seperated decimal values. (See my earlier thread about this here (http://www.sencha.com/forum/showthread.php?113811))

Upon the rowSelectionModel rowdeselect event, I do some sanity checking, and I save the store is everything went well. The function looks like this:



Grid.getSelectionModel().on('rowdeselect', function(sm, rowIdx, rec) {
if((rec.get("CellWithCustomEditor") != 0)....
});
But this only works if another cell is selected first before changing the row. So, as far as I understand, my custom editor lacks a certain function/method that reads the user input from the DOM, and writes it to the store upon rowchange (it does work on cell change).

Can anyone tell me what that method is supposed to be? I use laurentParis's example code from this topic (http://www.sencha.com/forum/showthread.php?113811), so I have the setValue and parseValue defined.