As shown in the first picture, this is the initial data. As shown in the second picture, this is the filtered data. How can I get the JSON of the filtered data?
Thank you for your assistance, best wishes.
Hi @Cesar Ge ,
You can find your answer in this post.
I tried the solution and it worked perfectly for me to get the filtered data.
You just need a javascript node inside the action you need to and then insert the following javascript:
var grid = OutSystems.GridAPI.GridManager.GetGridById($parameters.WidgetId)var data = grid.dataSource.toOSFormat(grid.provider.itemsSource._view)$parameters.GridData = data;
I hope this helps.
Regards,
Bryan
Hi @Bryan Villalobos ,
Does the filter operation trigger the OnInitialize event of the DataGrid?
No, OnInitialize event is not triggered during filter operation.
However, you can use the Grid_Events/OnFiltersChanged to listen to OnFiltersChanged event.
Okay, thank you for your help.
Hi @Bryan Villalobos,Does this method works also for filtered rows on other pages than the one is visualized (it seems not)?If not does datagrid provide any solution?Thanks