How to allow cell navigation in SlickGrid with a Validation Error?
I've noticed that when a validation error occurs, the user is locked into that cell until the error is resolved. I开发者_如何转开发s there a way to allow the user to continue to navigate cells?
This approach works for me b/c I don't commit when they leave the cell, but wait until they click a Save button. So, this button would be disabled while an error exists, but they are still free to navigate cells. Thank you.
You need to implement your own editorLock
function, that is passed to options. This feature, just as most of SlickGrid, is poorly documented, ut you can watch through source code of SlickGrid, and search for function called commitCurrentEdit
.
The example of editorLock
is in the file slick.core.js
Also, before rendering the grid you can try to do this:
Slick.GlobalEditorLock.commitCurrentEdit = function(){
return true;
}
精彩评论