I understand that when a tree grid widget has a set page size, Valence adds a new OFFSET or FETCH line to the data source.
If I am on the second page and then I call an RPG program that changes the size of the result set and then I refresh the widget, I find that the OFFSET line in the data source stays in the data source when the SQL statement is re-ran.
For example, if the page size is configured to 50 and I refresh my tree grid while I am on page 2, the "refresh" would show me all of the results except for the first 50. This is always a problem, but it's most apparent when the new result set becomes <= 50. At that point, my tree grid shows "no results" and updates the page count on screen from page 2 to page 0.
This can be fixed if you refresh the entire app using this javascript script: window.location.reload(), but it would be great if I could set my widget to return to the first page upon refresh. That way, I wouldn't have to refresh my entire app.
If I am on the second page and then I call an RPG program that changes the size of the result set and then I refresh the widget, I find that the OFFSET line in the data source stays in the data source when the SQL statement is re-ran.
For example, if the page size is configured to 50 and I refresh my tree grid while I am on page 2, the "refresh" would show me all of the results except for the first 50. This is always a problem, but it's most apparent when the new result set becomes <= 50. At that point, my tree grid shows "no results" and updates the page count on screen from page 2 to page 0.
This can be fixed if you refresh the entire app using this javascript script: window.location.reload(), but it would be great if I could set my widget to return to the first page upon refresh. That way, I wouldn't have to refresh my entire app.
Comment