Change grid parser to ensure inline edits are saved before row operation is executed

On this forum you can see a list of new features requested by users and you can also cast your own vote (you need to login to vote).
Post Reply
nhofkes
Posts: 124
Joined: Mon Sep 07, 2020 6:03 am
Location: Netherlands

Change grid parser to ensure inline edits are saved before row operation is executed

Post by nhofkes »

Reference is made to the issue flagged in this post. While this can be solved by a custom render script for the grid as explained here, I suggest to adjust the parser script in such way that inline edits are saved first (and any resulting BO rules are executed), before the row operation is executed (instead of both running simultanously). This is especially so because, as I understand from Aware Support, the BO rules are normally not running in parallel to any process rules and there is no way to test if the execution of BO rules is completed nor can a callback be attached.

Implementing this change should not be very difficult. Because saving the inline edits is done by calling grid.dataSource.sync(), which returns a Promise, this asynchronous function can be coupled with a second function that executes the row operation.
Alternatively, perhaps this can be solved even more easily by making the function "saveInlineEdits" an 'async' function and changing the following line in that function:
grid.dataSource.sync ();
to:
await grid.dataSource.sync ();
Niels
(V9.0 build 3272 - MariaDB - Windows)
Post Reply