Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1460
Can't cancel editCellEnding
posted

I can't stop event propagation from the editCellEnding event.  In the event a user enters something other than a number, I show them an alert and want the focus to remain on the current cell, and it to stay in edit mode.  If I try this and enter an invalid value and tab away, then the alert is shown but the focus is moved to the next cell and it enters edit mode.  I've tried stopPropagation, stopImmediatePropagation, preventDefault and just returning false but nothing seems to stop it.

 

editCellEnding: function (evt, ui) {
                                
                                if(ui.value!='' && isNaN(ui.value)){
                                    alert('Not a valid scoring number');
                                    evt.stopPropagation();
                                    evt.stopImmediatePropagation();
                                    evt.preventDefault();
                                    return false;
                                }
Parents
No Data
Reply Children