Hi,
I have a WebNumericEdit field and I want that if the user type a comma or a dot, the control work. For now, it's only work with comma (probably because that what it is in my Windows configuration).Ex : (123,45 or 123.45) will do the same.thx
Its work!
thx alot!
The WebTextEdit allows to filter/modify/cancel/etc. keyboard. The oEvent.keyCode will replace any entry. The value of decimal separator is stored in decimalSeparator member variable. So, you may process ClientSideEvents.KeyPress and fake coma and dot as decimal separators.
function WebNumericEdit1_KeyPress(oEdit, keyCode, oEvent){ if(keyCode != 44 && keyCode != 46)// coma and dot return; var separatorCode = oEdit.decimalSeparator.charCodeAt(0); oEvent.keyCode = separatorCode;}