I have a NumberTextBox in a grid cell. How do I keep focus if input is out of range or invalid? (such that user cannot click away from the cell)?
Thanks!
I have a NumberTextBox in a grid cell. How do I keep focus if input is out of range or invalid? (such that user cannot click away from the cell)?
Thanks!
You can try something like this
function lockUserOnInput() {
if( ! dijit.byId('NumberBox').validate()) {
dijit.byId('NumberBox').focus();
dijit.byId('NumberBox').inputNode.focus(); // make damn sure
}
}
setInterval(lockUserOnInput, 250); // set the interval as intense as you need it to be :)