• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Resetting Tree Grids with a set page size

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resetting Tree Grids with a set page size

    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.

  • #2
    With the upcoming 6.2 release...you can link an app variable to the refresh property of your widget and provide a value of "firstPage" and it will load the first page of your widget.

    Comment


    • #3
      Thank you!

      Comment

      Working...
      X