Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor.js column autoSave boolean or function #260

Open
hvierendeels opened this issue Aug 21, 2012 · 0 comments
Open

editor.js column autoSave boolean or function #260

hvierendeels opened this issue Aug 21, 2012 · 0 comments

Comments

@hvierendeels
Copy link

In some cases , e.g. when editing new row in grid , autoSave may not be performed because id of new record
is not yet known in database.
In this case, autoSave could be prohibited by calling autoSave function

function setProperty(grid, cellElement, oldValue, value){
....
// perform auto-save (if applicable) in next tick to avoid
// unintentional mishaps due to order of handler execution
var autoSaveDo=false;//tshvr4
if(typeof column.autoSave=='function') autoSaveDo=column.autoSave(row,column,value);
else autoSaveDo=column.autoSave;
//column.autoSave && setTimeout(function(){var x=grid._trackError("autoSave");console.log('tshvr4 editor _trackErro x=',x);},0);
autoSaveDo && setTimeout(function(){var x=grid._trackError("autoSave");console.log('tshvr4 editor _trackErro x=',x);},0);
...
return value;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant