[DataGrid]The total from the grid should be made available on page.

We are working on Outsystems 11 and using Datagrid.

Issue : Not able to use value from Datagrid on the page for display.

Description:

We have Total to be displayed on the screen, the totals are getting calculated in Rest API's of the datagrid.

But the issue is that the preparation of page completes and then the Rest API of datagrid is triggered.

Is there a way to get the value from datagrid and assign to a variable when the preparation runs?


Regards,

Akash



Hi Akash,

I think the only way to solve this is to call the Rest API in your preparation. Doesn't seem like you can use the data of the DataGrid

Regards,

Ruben

Hi Akash,

You could call the REST API and then assign the result to your "DataGrid" and then do an "Ajax Refresh" on your screen. 

Depending on the way you implement you may need to use a "Refresh Data" to update the data before using "Ajax Refresh".

Ruben van Vugt wrote:

Hi Akash,

I think the only way to solve this is to call the Rest API in your preparation. Doesn't seem like you can use the data of the DataGrid

Regards,

Ruben

Hi Ruben,


Thanks for the reply !

I am calling the rest API in the preparation, but the preparation completes first and then the GET call is made for the data grid.



1. The DataGrid can do the calculation its self.  See Wijmo Aggregate functionality:  https://www.grapecity.com/wijmo/demos/Grid/Aggregation/Belowthedata/purejs

2. I believe if the grid is not visually right after the data is loaded you can hook into the updateRows or updatedView events to refresh or add the Aggregate.

erik berg wrote:

1. The DataGrid can do the calculation its self.  See Wijmo Aggregate functionality:  https://www.grapecity.com/wijmo/demos/Grid/Aggregation/Belowthedata/purejs

2. I believe if the grid is not visually right after the data is loaded you can hook into the updateRows or updatedView events to refresh or add the Aggregate.


Hi Eric,


Thanks for the reply !

The grid data is calculated fine, the problem is I want to get one of the columns value  present in Grid and set this (bind this) value when the preparation runs to one of variable on page.