[Data Grid] Data Grid not displaying data but count at the bottom of grid is accurate

Forge Component
(28)
Published on 24 Sep (3 weeks ago) by OutSystems R&D
28 votes
Published on 24 Sep (3 weeks ago) by OutSystems R&D

Good morning all, Data Grid seems to be perfect for a reporting page I am creating.   I have my REST API configured and working and the Data Grid is added to my screen, however when I add the columns nothing is displayed at run time.   The count at the bottom of the grid is correct, and I've debugged through the API and I can see that I'm passing in the proper parameters and it is passing back the structure as expected.   (I also ran the same input via the browser and inspected the JSON that is returned and it looks good)

Attached is a screenshot showing how I configured my column along with an example of the JSON that I get back from the REST API.  Any idea what I'm doing incorrectly?


*EDIT  


I found part of the issue.   The Data Grid resides in a web block that is controlled by a filter section at the top of the page.   Where the user can select From/To Dates and other assorted values.   Those get passed to the REST API to filter down the results.   When the web block runs the first time the data is displayed in the grid, however if I change my filters and do a new search I see the API call occur and the proper data is returned but the Data Grid is empty.   The only thing that updates in that pane is the count of the number of records at the bottom.   So it seems that refreshing the web block is the root cause of the issue, but I'm not sure how to get around that.

Josh

Can you perhaps explain where/how you are binding the results from the API to the Data Grid? Perhaps the grid is not getting a refreshed list of values?

Hanno

Hanno wrote:

Josh

Can you perhaps explain where/how you are binding the results from the API to the Data Grid? Perhaps the grid is not getting a refreshed list of values?

Hanno

It’s the standard Datagrid implementation as shown in the sample.   The issue is that I have the DG inside a web block and that web block gets Ajax refreshed when the user changes selections on the main page.


When the block is refreshed the API call is successful but the grid is empty except for the counts at the bottom.    The DG also works fine on the first rendering of its web block it just cannot be refreshed.


i found another user comment in the support forum from May and they were experiencing the same behavior.   Their solution was to enclose the DG in an Iframe and just redraw that frame when an Ajax refresh would normally be used.   That works, but it’s a hack way to get there IMO.