beforeEditEnd - editCell, update error

hi.
If the data is greater than 1000,
I want to initialize the value and to position the cursor on the value.

example)
grid1.events.on(“beforeEditEnd”, function(data, value) {
if (data > 1000) {
alert(‘check’);
dhx.awaitRedraw().then(function () {
grid1.editCell(value.id, grid1.config.columns[0].id, “input”);
grid1.data.update(value.id, {column1: “”});
});
}
});

grid2.events.on(“beforeEditEnd”, function(data, value) {
if (data > 1000) {
alert(‘check’);
dhx.awaitRedraw().then(function () {
grid2.editCell(value.id, grid2.config.columns[0].id, “input”);
grid2.data.update(value.id, {column1: “”});
});
}
});

If I start operating from grid1, grid1 will operate normally, and grid2 will not initialize the value.
When operating from grid2, grid2 is normally operated and grid1 is not initialized.

There is nothing wrong with snippets.
But it’s a problem if I apply the same code to my project.

Is there a code to try in a different way?

You can simply use “return fasle” to block the editor closing. Like:

grid1.events.on(“beforeEditEnd”, function(data, value) {
if (data > 1000) {
return false
});