Editing filtered data via grid: wrong values are displayed
Posted: Fri 21 Aug 2015 07:31
We used a subselect to filter the rows of a table which we want to edit; here a simple example to reproduce the problem with an existing table:
SELECT * from testtable WHERE testcolumn in (SELECT testcolumn from testtable);
Then we use the grid to edit values -> after editing values and leaving the row to update:
The changes in the database are done correctly -> ok
But the just changed row in the grid is reloaded/redisplayed with wrong values -> not ok
Sometimes only the edited field is affected, sometime multiple columns of the changed row are displayed with strange values.
When Executing the whole Sql again, then the real data is loaded again and the correct values are displayed. But in this case you cannot trust the displayed values during editing -> not good
SELECT * from testtable WHERE testcolumn in (SELECT testcolumn from testtable);
Then we use the grid to edit values -> after editing values and leaving the row to update:
The changes in the database are done correctly -> ok
But the just changed row in the grid is reloaded/redisplayed with wrong values -> not ok
Sometimes only the edited field is affected, sometime multiple columns of the changed row are displayed with strange values.
When Executing the whole Sql again, then the real data is loaded again and the correct values are displayed. But in this case you cannot trust the displayed values during editing -> not good